home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 80 / maccd 80.iso / online / Fizzilla.sit / Fizzilla / viewer / Components / nsSidebar.js < prev    next >
MacBinary  |  2001-03-26  |  16.8 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Janne Salmijarvi Optimizer (music/janneSalmijarviOptimizer) ext Supported
1% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Mon Mar 26 11:10:24 2001, modified Mon Mar 26 11:10:24 2001, creator 'CWIE', type ASCII, 16386 bytes "nsSidebar.js" , at 0x4082 412 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% dearkID deark: macbinary default
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 6e 73 53 69 64 65 | 62 61 72 2e 6a 73 00 00 |..nsSide|bar.js..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 00 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 40 02 00 | 00 01 9c b6 e5 1a 70 b6 |.....@..|......p.|
|00000060| e5 1a 70 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..p.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 90 b6 00 00 |........|........|
|00000080| 2f 2a 20 2d 2a 2d 20 4d | 6f 64 65 3a 20 43 2b 2b |/* -*- M|ode: C++|
|00000090| 3b 20 74 61 62 2d 77 69 | 64 74 68 3a 20 34 3b 20 |; tab-wi|dth: 4; |
|000000a0| 69 6e 64 65 6e 74 2d 74 | 61 62 73 2d 6d 6f 64 65 |indent-t|abs-mode|
|000000b0| 3a 20 6e 69 6c 3b 20 63 | 2d 62 61 73 69 63 2d 6f |: nil; c|-basic-o|
|000000c0| 66 66 73 65 74 3a 20 34 | 20 2d 2a 2d 0d 20 2a 20 |ffset: 4| -*-. * |
|000000d0| 54 68 65 20 63 6f 6e 74 | 65 6e 74 73 20 6f 66 20 |The cont|ents of |
|000000e0| 74 68 69 73 20 66 69 6c | 65 20 61 72 65 20 73 75 |this fil|e are su|
|000000f0| 62 6a 65 63 74 20 74 6f | 20 74 68 65 20 4d 6f 7a |bject to| the Moz|
|00000100| 69 6c 6c 61 20 50 75 62 | 6c 69 63 0d 20 2a 20 4c |illa Pub|lic. * L|
|00000110| 69 63 65 6e 73 65 20 56 | 65 72 73 69 6f 6e 20 31 |icense V|ersion 1|
|00000120| 2e 31 20 28 74 68 65 20 | 22 4c 69 63 65 6e 73 65 |.1 (the |"License|
|00000130| 22 29 3b 20 79 6f 75 20 | 6d 61 79 20 6e 6f 74 20 |"); you |may not |
|00000140| 75 73 65 20 74 68 69 73 | 20 66 69 6c 65 0d 20 2a |use this| file. *|
|00000150| 20 65 78 63 65 70 74 20 | 69 6e 20 63 6f 6d 70 6c | except |in compl|
|00000160| 69 61 6e 63 65 20 77 69 | 74 68 20 74 68 65 20 4c |iance wi|th the L|
|00000170| 69 63 65 6e 73 65 2e 20 | 59 6f 75 20 6d 61 79 20 |icense. |You may |
|00000180| 6f 62 74 61 69 6e 20 61 | 20 63 6f 70 79 20 6f 66 |obtain a| copy of|
|00000190| 0d 20 2a 20 74 68 65 20 | 4c 69 63 65 6e 73 65 20 |. * the |License |
|000001a0| 61 74 20 68 74 74 70 3a | 2f 2f 77 77 77 2e 6d 6f |at http:|//www.mo|
|000001b0| 7a 69 6c 6c 61 2e 6f 72 | 67 2f 4d 50 4c 2f 0d 20 |zilla.or|g/MPL/. |
|000001c0| 2a 20 0d 20 2a 20 53 6f | 66 74 77 61 72 65 20 64 |* . * So|ftware d|
|000001d0| 69 73 74 72 69 62 75 74 | 65 64 20 75 6e 64 65 72 |istribut|ed under|
|000001e0| 20 74 68 65 20 4c 69 63 | 65 6e 73 65 20 69 73 20 | the Lic|ense is |
|000001f0| 64 69 73 74 72 69 62 75 | 74 65 64 20 6f 6e 20 61 |distribu|ted on a|
|00000200| 6e 20 22 41 53 0d 20 2a | 20 49 53 22 20 62 61 73 |n "AS. *| IS" bas|
|00000210| 69 73 2c 20 57 49 54 48 | 4f 55 54 20 57 41 52 52 |is, WITH|OUT WARR|
|00000220| 41 4e 54 59 20 4f 46 20 | 41 4e 59 20 4b 49 4e 44 |ANTY OF |ANY KIND|
|00000230| 2c 20 65 69 74 68 65 72 | 20 65 78 70 72 65 73 73 |, either| express|
|00000240| 20 6f 72 0d 20 2a 20 69 | 6d 70 6c 69 65 64 2e 20 | or. * i|mplied. |
|00000250| 53 65 65 20 74 68 65 20 | 4c 69 63 65 6e 73 65 20 |See the |License |
|00000260| 66 6f 72 20 74 68 65 20 | 73 70 65 63 69 66 69 63 |for the |specific|
|00000270| 20 6c 61 6e 67 75 61 67 | 65 20 67 6f 76 65 72 6e | languag|e govern|
|00000280| 69 6e 67 0d 20 2a 20 72 | 69 67 68 74 73 20 61 6e |ing. * r|ights an|
|00000290| 64 20 6c 69 6d 69 74 61 | 74 69 6f 6e 73 20 75 6e |d limita|tions un|
|000002a0| 64 65 72 20 74 68 65 20 | 4c 69 63 65 6e 73 65 2e |der the |License.|
|000002b0| 0d 20 2a 20 0d 20 2a 20 | 54 68 65 20 4f 72 69 67 |. * . * |The Orig|
|000002c0| 69 6e 61 6c 20 43 6f 64 | 65 20 69 73 20 6d 6f 7a |inal Cod|e is moz|
|000002d0| 69 6c 6c 61 2e 6f 72 67 | 20 63 6f 64 65 2e 0d 20 |illa.org| code.. |
|000002e0| 2a 20 0d 20 2a 20 54 68 | 65 20 49 6e 69 74 69 61 |* . * Th|e Initia|
|000002f0| 6c 20 44 65 76 65 6c 6f | 70 65 72 20 6f 66 20 74 |l Develo|per of t|
|00000300| 68 65 20 4f 72 69 67 69 | 6e 61 6c 20 43 6f 64 65 |he Origi|nal Code|
|00000310| 20 69 73 20 4e 65 74 73 | 63 61 70 65 0d 20 2a 20 | is Nets|cape. * |
|00000320| 43 6f 6d 6d 75 6e 69 63 | 61 74 69 6f 6e 73 20 43 |Communic|ations C|
|00000330| 6f 72 70 6f 72 61 74 69 | 6f 6e 2e 20 20 50 6f 72 |orporati|on. Por|
|00000340| 74 69 6f 6e 73 20 63 72 | 65 61 74 65 64 20 62 79 |tions cr|eated by|
|00000350| 20 4e 65 74 73 63 61 70 | 65 20 61 72 65 0d 20 2a | Netscap|e are. *|
|00000360| 20 43 6f 70 79 72 69 67 | 68 74 20 28 43 29 20 31 | Copyrig|ht (C) 1|
|00000370| 39 39 39 20 4e 65 74 73 | 63 61 70 65 20 43 6f 6d |999 Nets|cape Com|
|00000380| 6d 75 6e 69 63 61 74 69 | 6f 6e 73 20 43 6f 72 70 |municati|ons Corp|
|00000390| 6f 72 61 74 69 6f 6e 2e | 20 20 41 6c 6c 0d 20 2a |oration.| All. *|
|000003a0| 20 52 69 67 68 74 73 20 | 52 65 73 65 72 76 65 64 | Rights |Reserved|
|000003b0| 2e 0d 20 2a 20 0d 20 2a | 20 43 6f 6e 74 72 69 62 |.. * . *| Contrib|
|000003c0| 75 74 6f 72 28 73 29 3a | 20 53 74 65 70 68 65 6e |utor(s):| Stephen|
|000003d0| 20 4c 61 6d 6d 20 20 20 | 20 20 20 20 20 20 20 20 | Lamm | |
|000003e0| 20 3c 73 6c 61 6d 6d 40 | 6e 65 74 73 63 61 70 65 | <slamm@|netscape|
|000003f0| 2e 63 6f 6d 3e 0d 20 2a | 20 20 20 20 20 20 20 20 |.com>. *| |
|00000400| 20 20 20 20 20 20 20 20 | 20 52 6f 62 65 72 74 20 | | Robert |
|00000410| 4a 6f 68 6e 20 43 68 75 | 72 63 68 69 6c 6c 20 20 |John Chu|rchill |
|00000420| 20 3c 72 6a 63 40 6e 65 | 74 73 63 61 70 65 2e 63 | <rjc@ne|tscape.c|
|00000430| 6f 6d 3e 0d 20 2a 2f 0d | 0d 2f 2a 0d 20 2a 20 4e |om>. */.|./*. * N|
|00000440| 6f 20 6d 61 67 69 63 20 | 63 6f 6e 73 74 72 75 63 |o magic |construc|
|00000450| 74 6f 72 20 62 65 68 61 | 76 69 6f 75 72 2c 20 61 |tor beha|viour, a|
|00000460| 73 20 69 73 20 64 65 20 | 72 69 67 65 75 72 20 66 |s is de |rigeur f|
|00000470| 6f 72 20 58 50 43 4f 4d | 2e 0d 20 2a 20 49 66 20 |or XPCOM|.. * If |
|00000480| 79 6f 75 20 6d 75 73 74 | 20 70 65 72 66 6f 72 6d |you must| perform|
|00000490| 20 73 6f 6d 65 20 69 6e | 69 74 69 61 6c 69 7a 61 | some in|itializa|
|000004a0| 74 69 6f 6e 2c 20 61 6e | 64 20 69 74 20 63 6f 75 |tion, an|d it cou|
|000004b0| 6c 64 20 70 6f 73 73 69 | 62 6c 79 20 66 61 69 6c |ld possi|bly fail|
|000004c0| 20 28 65 76 65 6e 0d 20 | 2a 20 64 75 65 20 74 6f | (even. |* due to|
|000004d0| 20 61 6e 20 6f 75 74 2d | 6f 66 2d 6d 65 6d 6f 72 | an out-|of-memor|
|000004e0| 79 20 63 6f 6e 64 69 74 | 69 6f 6e 29 2c 20 79 6f |y condit|ion), yo|
|000004f0| 75 20 73 68 6f 75 6c 64 | 20 75 73 65 20 61 6e 20 |u should| use an |
|00000500| 49 6e 69 74 20 6d 65 74 | 68 6f 64 2c 20 77 68 69 |Init met|hod, whi|
|00000510| 63 68 0d 20 2a 20 63 61 | 6e 20 63 6f 6e 76 65 79 |ch. * ca|n convey|
|00000520| 20 66 61 69 6c 75 72 65 | 20 61 70 70 72 6f 70 72 | failure| appropr|
|00000530| 69 61 74 65 6c 79 20 28 | 74 68 72 6f 77 6e 20 65 |iately (|thrown e|
|00000540| 78 63 65 70 74 69 6f 6e | 20 69 6e 20 4a 53 2c 0d |xception| in JS,.|
|00000550| 20 2a 20 4e 53 5f 46 41 | 49 4c 45 44 28 6e 73 72 | * NS_FA|ILED(nsr|
|00000560| 65 73 75 6c 74 29 20 72 | 65 74 75 72 6e 20 69 6e |esult) r|eturn in|
|00000570| 20 43 2b 2b 29 2e 0d 20 | 2a 0d 20 2a 20 49 6e 20 | C++).. |*. * In |
|00000580| 4a 53 2c 20 79 6f 75 20 | 63 61 6e 20 61 63 74 75 |JS, you |can actu|
|00000590| 61 6c 6c 79 20 63 68 65 | 61 74 2c 20 62 65 63 61 |ally che|at, beca|
|000005a0| 75 73 65 20 61 20 74 68 | 72 6f 77 6e 20 65 78 63 |use a th|rown exc|
|000005b0| 65 70 74 69 6f 6e 20 77 | 69 6c 6c 20 63 61 75 73 |eption w|ill caus|
|000005c0| 65 20 74 68 65 0d 20 2a | 20 43 72 65 61 74 65 49 |e the. *| CreateI|
|000005d0| 6e 73 74 61 6e 63 65 20 | 63 61 6c 6c 20 74 6f 20 |nstance |call to |
|000005e0| 66 61 69 6c 20 69 6e 20 | 74 75 72 6e 2c 20 62 75 |fail in |turn, bu|
|000005f0| 74 20 6e 6f 74 20 61 6c | 6c 20 6c 61 6e 67 75 61 |t not al|l langua|
|00000600| 67 65 73 20 61 72 65 20 | 73 6f 20 6c 75 63 6b 79 |ges are |so lucky|
|00000610| 2e 0d 20 2a 20 28 54 68 | 6f 75 67 68 20 41 4e 53 |.. * (Th|ough ANS|
|00000620| 49 20 43 2b 2b 20 70 72 | 6f 76 69 64 65 73 20 65 |I C++ pr|ovides e|
|00000630| 78 63 65 70 74 69 6f 6e | 73 2c 20 74 68 65 79 20 |xception|s, they |
|00000640| 61 72 65 20 76 65 72 62 | 6f 74 65 6e 20 69 6e 20 |are verb|oten in |
|00000650| 4d 6f 7a 69 6c 6c 61 20 | 63 6f 64 65 0d 20 2a 20 |Mozilla |code. * |
|00000660| 66 6f 72 20 70 6f 72 74 | 61 62 69 6c 69 74 79 20 |for port|ability |
|00000670| 72 65 61 73 6f 6e 73 20 | 2d 2d 20 61 6e 64 20 65 |reasons |-- and e|
|00000680| 76 65 6e 20 77 68 65 6e | 20 79 6f 75 27 72 65 20 |ven when| you're |
|00000690| 62 75 69 6c 64 69 6e 67 | 20 63 6f 6d 70 6c 65 74 |building| complet|
|000006a0| 65 6c 79 0d 20 2a 20 70 | 6c 61 74 66 6f 72 6d 2d |ely. * p|latform-|
|000006b0| 73 70 65 63 69 66 69 63 | 20 63 6f 64 65 2c 20 79 |specific| code, y|
|000006c0| 6f 75 20 63 61 6e 27 74 | 20 74 68 72 6f 77 20 61 |ou can't| throw a|
|000006d0| 63 72 6f 73 73 20 61 6e | 20 58 50 43 4f 4d 20 6d |cross an| XPCOM m|
|000006e0| 65 74 68 6f 64 20 62 6f | 75 6e 64 61 72 79 2e 29 |ethod bo|undary.)|
|000006f0| 0d 20 2a 2f 0d 0d 63 6f | 6e 73 74 20 44 45 42 55 |. */..co|nst DEBU|
|00000700| 47 20 3d 20 66 61 6c 73 | 65 3b 20 2f 2a 20 73 65 |G = fals|e; /* se|
|00000710| 74 20 74 6f 20 66 61 6c | 73 65 20 74 6f 20 73 75 |t to fal|se to su|
|00000720| 70 70 72 65 73 73 20 64 | 65 62 75 67 20 6d 65 73 |ppress d|ebug mes|
|00000730| 73 61 67 65 73 20 2a 2f | 0d 63 6f 6e 73 74 20 50 |sages */|.const P|
|00000740| 41 4e 45 4c 53 5f 52 44 | 46 5f 46 49 4c 45 20 20 |ANELS_RD|F_FILE |
|00000750| 3d 20 22 55 50 6e 6c 73 | 22 3b 20 2f 2a 20 64 69 |= "UPnls|"; /* di|
|00000760| 72 65 63 74 6f 72 79 20 | 73 65 72 76 69 63 65 73 |rectory |services|
|00000770| 20 70 72 6f 70 65 72 74 | 79 20 74 6f 20 66 69 6e | propert|y to fin|
|00000780| 64 20 70 61 6e 65 6c 73 | 2e 72 64 66 20 2a 2f 0d |d panels|.rdf */.|
|00000790| 0d 63 6f 6e 73 74 20 53 | 49 44 45 42 41 52 5f 43 |.const S|IDEBAR_C|
|000007a0| 4f 4e 54 52 41 43 54 49 | 44 20 20 20 3d 20 22 40 |ONTRACTI|D = "@|
|000007b0| 6d 6f 7a 69 6c 6c 61 2e | 6f 72 67 2f 73 69 64 65 |mozilla.|org/side|
|000007c0| 62 61 72 3b 31 22 3b 0d | 63 6f 6e 73 74 20 53 49 |bar;1";.|const SI|
|000007d0| 44 45 42 41 52 5f 43 49 | 44 20 20 20 20 20 20 3d |DEBAR_CI|D =|
|000007e0| 20 43 6f 6d 70 6f 6e 65 | 6e 74 73 2e 49 44 28 22 | Compone|nts.ID("|
|000007f0| 7b 32 32 31 31 37 31 34 | 30 2d 39 63 36 65 2d 31 |{2211714|0-9c6e-1|
|00000800| 31 64 33 2d 61 61 66 31 | 2d 30 30 38 30 35 66 38 |1d3-aaf1|-00805f8|
|00000810| 61 34 39 30 35 7d 22 29 | 3b 0d 63 6f 6e 73 74 20 |a4905}")|;.const |
|00000820| 43 4f 4e 54 41 49 4e 45 | 52 5f 43 4f 4e 54 52 41 |CONTAINE|R_CONTRA|
|00000830| 43 54 49 44 20 3d 20 22 | 40 6d 6f 7a 69 6c 6c 61 |CTID = "|@mozilla|
|00000840| 2e 6f 72 67 2f 72 64 66 | 2f 63 6f 6e 74 61 69 6e |.org/rdf|/contain|
|00000850| 65 72 3b 31 22 3b 0d 63 | 6f 6e 73 74 20 44 49 52 |er;1";.c|onst DIR|
|00000860| 5f 53 45 52 56 5f 43 4f | 4e 54 52 41 43 54 49 44 |_SERV_CO|NTRACTID|
|00000870| 20 20 3d 20 22 40 6d 6f | 7a 69 6c 6c 61 2e 6f 72 | = "@mo|zilla.or|
|00000880| 67 2f 66 69 6c 65 2f 64 | 69 72 65 63 74 6f 72 79 |g/file/d|irectory|
|00000890| 5f 73 65 72 76 69 63 65 | 3b 31 22 0d 63 6f 6e 73 |_service|;1".cons|
|000008a0| 74 20 53 54 44 5f 55 52 | 4c 5f 43 4f 4e 54 52 41 |t STD_UR|L_CONTRA|
|000008b0| 43 54 49 44 20 20 20 3d | 20 22 40 6d 6f 7a 69 6c |CTID =| "@mozil|
|000008c0| 6c 61 2e 6f 72 67 2f 6e | 65 74 77 6f 72 6b 2f 73 |la.org/n|etwork/s|
|000008d0| 74 61 6e 64 61 72 64 2d | 75 72 6c 3b 31 22 0d 63 |tandard-|url;1".c|
|000008e0| 6f 6e 73 74 20 4e 45 54 | 53 45 41 52 43 48 5f 43 |onst NET|SEARCH_C|
|000008f0| 4f 4e 54 52 41 43 54 49 | 44 20 3d 20 22 40 6d 6f |ONTRACTI|D = "@mo|
|00000900| 7a 69 6c 6c 61 2e 6f 72 | 67 2f 72 64 66 2f 64 61 |zilla.or|g/rdf/da|
|00000910| 74 61 73 6f 75 72 63 65 | 3b 31 3f 6e 61 6d 65 3d |tasource|;1?name=|
|00000920| 69 6e 74 65 72 6e 65 74 | 73 65 61 72 63 68 22 0d |internet|search".|
|00000930| 63 6f 6e 73 74 20 6e 73 | 49 53 75 70 70 6f 72 74 |const ns|ISupport|
|00000940| 73 20 20 20 20 20 20 3d | 20 43 6f 6d 70 6f 6e 65 |s =| Compone|
|00000950| 6e 74 73 2e 69 6e 74 65 | 72 66 61 63 65 73 2e 6e |nts.inte|rfaces.n|
|00000960| 73 49 53 75 70 70 6f 72 | 74 73 3b 0d 63 6f 6e 73 |sISuppor|ts;.cons|
|00000970| 74 20 6e 73 49 46 61 63 | 74 6f 72 79 20 20 20 20 |t nsIFac|tory |
|00000980| 20 20 20 3d 20 43 6f 6d | 70 6f 6e 65 6e 74 73 2e | = Com|ponents.|
|00000990| 69 6e 74 65 72 66 61 63 | 65 73 2e 6e 73 49 46 61 |interfac|es.nsIFa|
|000009a0| 63 74 6f 72 79 3b 0d 63 | 6f 6e 73 74 20 6e 73 49 |ctory;.c|onst nsI|
|000009b0| 53 69 64 65 62 61 72 20 | 20 20 20 20 20 20 3d 20 |Sidebar | = |
|000009c0| 43 6f 6d 70 6f 6e 65 6e | 74 73 2e 69 6e 74 65 72 |Componen|ts.inter|
|000009d0| 66 61 63 65 73 2e 6e 73 | 49 53 69 64 65 62 61 72 |faces.ns|ISidebar|
|000009e0| 3b 0d 63 6f 6e 73 74 20 | 6e 73 49 52 44 46 43 6f |;.const |nsIRDFCo|
|000009f0| 6e 74 61 69 6e 65 72 20 | 20 3d 20 43 6f 6d 70 6f |ntainer | = Compo|
|00000a00| 6e 65 6e 74 73 2e 69 6e | 74 65 72 66 61 63 65 73 |nents.in|terfaces|
|00000a10| 2e 6e 73 49 52 44 46 43 | 6f 6e 74 61 69 6e 65 72 |.nsIRDFC|ontainer|
|00000a20| 3b 0d 63 6f 6e 73 74 20 | 6e 73 49 50 72 6f 70 65 |;.const |nsIPrope|
|00000a30| 72 74 69 65 73 20 20 20 | 20 3d 20 43 6f 6d 70 6f |rties | = Compo|
|00000a40| 6e 65 6e 74 73 2e 69 6e | 74 65 72 66 61 63 65 73 |nents.in|terfaces|
|00000a50| 2e 6e 73 49 50 72 6f 70 | 65 72 74 69 65 73 3b 0d |.nsIProp|erties;.|
|00000a60| 63 6f 6e 73 74 20 6e 73 | 49 46 69 6c 65 55 52 4c |const ns|IFileURL|
|00000a70| 20 20 20 20 20 20 20 3d | 20 43 6f 6d 70 6f 6e 65 | =| Compone|
|00000a80| 6e 74 73 2e 69 6e 74 65 | 72 66 61 63 65 73 2e 6e |nts.inte|rfaces.n|
|00000a90| 73 49 46 69 6c 65 55 52 | 4c 3b 0d 63 6f 6e 73 74 |sIFileUR|L;.const|
|00000aa0| 20 6e 73 49 52 44 46 52 | 65 6d 6f 74 65 44 61 74 | nsIRDFR|emoteDat|
|00000ab0| 61 53 6f 75 72 63 65 20 | 3d 20 43 6f 6d 70 6f 6e |aSource |= Compon|
|00000ac0| 65 6e 74 73 2e 69 6e 74 | 65 72 66 61 63 65 73 2e |ents.int|erfaces.|
|00000ad0| 6e 73 49 52 44 46 52 65 | 6d 6f 74 65 44 61 74 61 |nsIRDFRe|moteData|
|00000ae0| 53 6f 75 72 63 65 3b 0d | 63 6f 6e 73 74 20 6e 73 |Source;.|const ns|
|00000af0| 49 49 6e 74 65 72 6e 65 | 74 53 65 61 72 63 68 53 |IInterne|tSearchS|
|00000b00| 65 72 76 69 63 65 20 3d | 20 43 6f 6d 70 6f 6e 65 |ervice =| Compone|
|00000b10| 6e 74 73 2e 69 6e 74 65 | 72 66 61 63 65 73 2e 6e |nts.inte|rfaces.n|
|00000b20| 73 49 49 6e 74 65 72 6e | 65 74 53 65 61 72 63 68 |sIIntern|etSearch|
|00000b30| 53 65 72 76 69 63 65 3b | 0d 63 6f 6e 73 74 20 6e |Service;|.const n|
|00000b40| 73 49 53 65 63 75 72 69 | 74 79 43 68 65 63 6b 65 |sISecuri|tyChecke|
|00000b50| 64 43 6f 6d 70 6f 6e 65 | 6e 74 20 3d 20 43 6f 6d |dCompone|nt = Com|
|00000b60| 70 6f 6e 65 6e 74 73 2e | 69 6e 74 65 72 66 61 63 |ponents.|interfac|
|00000b70| 65 73 2e 6e 73 49 53 65 | 63 75 72 69 74 79 43 68 |es.nsISe|curityCh|
|00000b80| 65 63 6b 65 64 43 6f 6d | 70 6f 6e 65 6e 74 3b 0d |eckedCom|ponent;.|
|00000b90| 0d 66 75 6e 63 74 69 6f | 6e 20 6e 73 53 69 64 65 |.functio|n nsSide|
|00000ba0| 62 61 72 28 29 0d 7b 0d | 20 20 20 20 63 6f 6e 73 |bar().{.| cons|
|00000bb0| 74 20 52 44 46 5f 43 4f | 4e 54 52 41 43 54 49 44 |t RDF_CO|NTRACTID|
|00000bc0| 20 3d 20 22 40 6d 6f 7a | 69 6c 6c 61 2e 6f 72 67 | = "@moz|illa.org|
|00000bd0| 2f 72 64 66 2f 72 64 66 | 2d 73 65 72 76 69 63 65 |/rdf/rdf|-service|
|00000be0| 3b 31 22 3b 0d 20 20 20 | 20 63 6f 6e 73 74 20 6e |;1";. | const n|
|00000bf0| 73 49 52 44 46 53 65 72 | 76 69 63 65 20 3d 20 43 |sIRDFSer|vice = C|
|00000c00| 6f 6d 70 6f 6e 65 6e 74 | 73 2e 69 6e 74 65 72 66 |omponent|s.interf|
|00000c10| 61 63 65 73 2e 6e 73 49 | 52 44 46 53 65 72 76 69 |aces.nsI|RDFServi|
|00000c20| 63 65 3b 0d 20 20 20 20 | 0d 20 20 20 20 74 68 69 |ce;. |. thi|
|00000c30| 73 2e 72 64 66 20 3d 20 | 43 6f 6d 70 6f 6e 65 6e |s.rdf = |Componen|
|00000c40| 74 73 2e 63 6c 61 73 73 | 65 73 5b 52 44 46 5f 43 |ts.class|es[RDF_C|
|00000c50| 4f 4e 54 52 41 43 54 49 | 44 5d 2e 67 65 74 53 65 |ONTRACTI|D].getSe|
|00000c60| 72 76 69 63 65 28 6e 73 | 49 52 44 46 53 65 72 76 |rvice(ns|IRDFServ|
|00000c70| 69 63 65 29 3b 0d 20 20 | 20 20 74 68 69 73 2e 64 |ice);. | this.d|
|00000c80| 61 74 61 73 6f 75 72 63 | 65 5f 75 72 69 20 3d 20 |atasourc|e_uri = |
|00000c90| 67 65 74 53 69 64 65 62 | 61 72 44 61 74 61 73 6f |getSideb|arDataso|
|00000ca0| 75 72 63 65 55 52 49 28 | 50 41 4e 45 4c 53 5f 52 |urceURI(|PANELS_R|
|00000cb0| 44 46 5f 46 49 4c 45 29 | 3b 0d 20 20 20 20 64 65 |DF_FILE)|;. de|
|00000cc0| 62 75 67 28 27 64 61 74 | 61 73 6f 75 72 63 65 5f |bug('dat|asource_|
|00000cd0| 75 72 69 20 69 73 20 27 | 20 2b 20 74 68 69 73 2e |uri is '| + this.|
|00000ce0| 64 61 74 61 73 6f 75 72 | 63 65 5f 75 72 69 29 3b |datasour|ce_uri);|
|00000cf0| 0d 20 20 20 20 74 68 69 | 73 2e 72 65 73 6f 75 72 |. thi|s.resour|
|00000d00| 63 65 20 3d 20 27 75 72 | 6e 3a 73 69 64 65 62 61 |ce = 'ur|n:sideba|
|00000d10| 72 3a 63 75 72 72 65 6e | 74 2d 70 61 6e 65 6c 2d |r:curren|t-panel-|
|00000d20| 6c 69 73 74 27 3b 0d 20 | 20 20 20 74 68 69 73 2e |list';. | this.|
|00000d30| 64 61 74 61 73 6f 75 72 | 63 65 20 3d 20 74 68 69 |datasour|ce = thi|
|00000d40| 73 2e 72 64 66 2e 47 65 | 74 44 61 74 61 53 6f 75 |s.rdf.Ge|tDataSou|
|00000d50| 72 63 65 28 74 68 69 73 | 2e 64 61 74 61 73 6f 75 |rce(this|.datasou|
|00000d60| 72 63 65 5f 75 72 69 29 | 3b 0d 7d 0d 0d 6e 73 53 |rce_uri)|;.}..nsS|
|00000d70| 69 64 65 62 61 72 2e 70 | 72 6f 74 6f 74 79 70 65 |idebar.p|rototype|
|00000d80| 2e 6e 63 20 3d 20 22 68 | 74 74 70 3a 2f 2f 68 6f |.nc = "h|ttp://ho|
|00000d90| 6d 65 2e 6e 65 74 73 63 | 61 70 65 2e 63 6f 6d 2f |me.netsc|ape.com/|
|00000da0| 4e 43 2d 72 64 66 23 22 | 3b 0d 0d 6e 73 53 69 64 |NC-rdf#"|;..nsSid|
|00000db0| 65 62 61 72 2e 70 72 6f | 74 6f 74 79 70 65 2e 73 |ebar.pro|totype.s|
|00000dc0| 65 74 57 69 6e 64 6f 77 | 20 3d 0d 66 75 6e 63 74 |etWindow| =.funct|
|00000dd0| 69 6f 6e 20 28 61 57 69 | 6e 64 6f 77 29 0d 7b 20 |ion (aWi|ndow).{ |
|00000de0| 20 20 20 0d 20 20 20 20 | 74 68 69 73 2e 77 69 6e | . |this.win|
|00000df0| 64 6f 77 20 3d 20 61 57 | 69 6e 64 6f 77 3b 20 20 |dow = aW|indow; |
|00000e00| 20 20 0d 7d 0d 0d 6e 73 | 53 69 64 65 62 61 72 2e | .}..ns|Sidebar.|
|00000e10| 70 72 6f 74 6f 74 79 70 | 65 2e 69 73 50 61 6e 65 |prototyp|e.isPane|
|00000e20| 6c 20 3d 0d 66 75 6e 63 | 74 69 6f 6e 20 28 61 43 |l =.func|tion (aC|
|00000e30| 6f 6e 74 65 6e 74 55 52 | 4c 29 0d 7b 0d 20 20 20 |ontentUR|L).{. |
|00000e40| 20 76 61 72 20 63 6f 6e | 74 61 69 6e 65 72 20 3d | var con|tainer =|
|00000e50| 20 0d 20 20 20 20 20 20 | 20 20 43 6f 6d 70 6f 6e | . | Compon|
|00000e60| 65 6e 74 73 2e 63 6c 61 | 73 73 65 73 5b 43 4f 4e |ents.cla|sses[CON|
|00000e70| 54 41 49 4e 45 52 5f 43 | 4f 4e 54 52 41 43 54 49 |TAINER_C|ONTRACTI|
|00000e80| 44 5d 2e 63 72 65 61 74 | 65 49 6e 73 74 61 6e 63 |D].creat|eInstanc|
|00000e90| 65 28 6e 73 49 52 44 46 | 43 6f 6e 74 61 69 6e 65 |e(nsIRDF|Containe|
|00000ea0| 72 29 3b 0d 0d 20 20 20 | 20 63 6f 6e 74 61 69 6e |r);.. | contain|
|00000eb0| 65 72 2e 49 6e 69 74 28 | 74 68 69 73 2e 64 61 74 |er.Init(|this.dat|
|00000ec0| 61 73 6f 75 72 63 65 2c | 20 74 68 69 73 2e 72 64 |asource,| this.rd|
|00000ed0| 66 2e 47 65 74 52 65 73 | 6f 75 72 63 65 28 74 68 |f.GetRes|ource(th|
|00000ee0| 69 73 2e 72 65 73 6f 75 | 72 63 65 29 29 3b 0d 20 |is.resou|rce));. |
|00000ef0| 20 20 20 0d 20 20 20 20 | 2f 2a 20 43 72 65 61 74 | . |/* Creat|
|00000f00| 65 20 61 20 72 65 73 6f | 75 72 63 65 20 66 6f 72 |e a reso|urce for|
|00000f10| 20 74 68 65 20 6e 65 77 | 20 70 61 6e 65 6c 20 61 | the new| panel a|
|00000f20| 6e 64 20 61 64 64 20 69 | 74 20 74 6f 20 74 68 65 |nd add i|t to the|
|00000f30| 20 6c 69 73 74 20 2a 2f | 0d 20 20 20 20 76 61 72 | list */|. var|
|00000f40| 20 70 61 6e 65 6c 5f 72 | 65 73 6f 75 72 63 65 20 | panel_r|esource |
|00000f50| 3d 20 0d 20 20 20 20 20 | 20 20 20 74 68 69 73 2e |= . | this.|
|00000f60| 72 64 66 2e 47 65 74 52 | 65 73 6f 75 72 63 65 28 |rdf.GetR|esource(|
|00000f70| 22 75 72 6e 3a 73 69 64 | 65 62 61 72 3a 33 72 64 |"urn:sid|ebar:3rd|
|00000f80| 70 61 72 74 79 2d 70 61 | 6e 65 6c 3a 22 20 2b 20 |party-pa|nel:" + |
|00000f90| 61 43 6f 6e 74 65 6e 74 | 55 52 4c 29 3b 0d 0d 20 |aContent|URL);.. |
|00000fa0| 20 20 20 72 65 74 75 72 | 6e 20 28 63 6f 6e 74 61 | retur|n (conta|
|00000fb0| 69 6e 65 72 2e 49 6e 64 | 65 78 4f 66 28 70 61 6e |iner.Ind|exOf(pan|
|00000fc0| 65 6c 5f 72 65 73 6f 75 | 72 63 65 29 20 21 3d 20 |el_resou|rce) != |
|00000fd0| 2d 31 29 3b 0d 7d 0d 0d | 66 75 6e 63 74 69 6f 6e |-1);.}..|function|
|00000fe0| 20 73 69 64 65 62 61 72 | 55 52 4c 53 65 63 75 72 | sidebar|URLSecur|
|00000ff0| 69 74 79 43 68 65 63 6b | 28 75 72 6c 29 0d 7b 0d |ityCheck|(url).{.|
|00001000| 20 20 20 20 69 66 20 28 | 75 72 6c 2e 73 65 61 72 | if (|url.sear|
|00001010| 63 68 28 2f 28 5e 68 74 | 74 70 3a 7c 5e 66 74 70 |ch(/(^ht|tp:|^ftp|
|00001020| 3a 7c 5e 68 74 74 70 73 | 3a 29 2f 29 20 3d 3d 20 |:|^https|:)/) == |
|00001030| 2d 31 29 0d 20 20 20 20 | 20 20 20 20 74 68 72 6f |-1). | thro|
|00001040| 77 20 22 53 63 72 69 70 | 74 20 61 74 74 65 6d 70 |w "Scrip|t attemp|
|00001050| 74 65 64 20 74 6f 20 61 | 64 64 20 73 69 64 65 62 |ted to a|dd sideb|
|00001060| 61 72 20 70 61 6e 65 6c | 20 66 72 6f 6d 20 69 6c |ar panel| from il|
|00001070| 6c 65 67 61 6c 20 73 6f | 75 72 63 65 22 3b 0d 7d |legal so|urce";.}|
|00001080| 0d 0d 2f 2a 20 64 65 63 | 6f 72 61 74 65 20 70 72 |../* dec|orate pr|
|00001090| 6f 74 6f 74 79 70 65 20 | 74 6f 20 70 72 6f 76 69 |ototype |to provi|
|000010a0| 64 65 20 60 60 63 6c 61 | 73 73 27 27 20 6d 65 74 |de ``cla|ss'' met|
|000010b0| 68 6f 64 73 20 61 6e 64 | 20 70 72 6f 70 65 72 74 |hods and| propert|
|000010c0| 79 20 61 63 63 65 73 73 | 6f 72 73 20 2a 2f 0d 6e |y access|ors */.n|
|000010d0| 73 53 69 64 65 62 61 72 | 2e 70 72 6f 74 6f 74 79 |sSidebar|.prototy|
|000010e0| 70 65 2e 61 64 64 50 61 | 6e 65 6c 20 3d 0d 66 75 |pe.addPa|nel =.fu|
|000010f0| 6e 63 74 69 6f 6e 20 28 | 61 54 69 74 6c 65 2c 20 |nction (|aTitle, |
|00001100| 61 43 6f 6e 74 65 6e 74 | 55 52 4c 2c 20 61 43 75 |aContent|URL, aCu|
|00001110| 73 74 6f 6d 69 7a 65 55 | 52 4c 29 0d 7b 0d 20 20 |stomizeU|RL).{. |
|00001120| 20 20 64 65 62 75 67 28 | 22 61 64 64 50 61 6e 65 | debug(|"addPane|
|00001130| 6c 28 22 20 2b 20 61 54 | 69 74 6c 65 20 2b 20 22 |l(" + aT|itle + "|
|00001140| 2c 20 22 20 2b 20 61 43 | 6f 6e 74 65 6e 74 55 52 |, " + aC|ontentUR|
|00001150| 4c 20 2b 20 22 2c 20 22 | 20 2b 0d 20 20 20 20 20 |L + ", "| +. |
|00001160| 20 20 20 20 20 61 43 75 | 73 74 6f 6d 69 7a 65 55 | aCu|stomizeU|
|00001170| 52 4c 20 2b 20 22 29 22 | 29 3b 0d 0d 20 20 20 20 |RL + ")"|);.. |
|00001180| 69 66 20 28 21 74 68 69 | 73 2e 77 69 6e 64 6f 77 |if (!thi|s.window|
|00001190| 29 0d 20 20 20 20 7b 0d | 20 20 20 20 20 20 20 20 |). {.| |
|000011a0| 64 65 62 75 67 20 28 22 | 6e 6f 20 77 69 6e 64 6f |debug ("|no windo|
|000011b0| 77 20 6f 62 6a 65 63 74 | 20 73 65 74 2c 20 62 61 |w object| set, ba|
|000011c0| 69 6c 69 6e 67 20 6f 75 | 74 2e 22 29 3b 0d 20 20 |iling ou|t.");. |
|000011d0| 20 20 20 20 20 20 74 68 | 72 6f 77 20 43 6f 6d 70 | th|row Comp|
|000011e0| 6f 6e 65 6e 74 73 2e 72 | 65 73 75 6c 74 73 2e 4e |onents.r|esults.N|
|000011f0| 53 5f 45 52 52 4f 52 5f | 4e 4f 54 5f 49 4e 49 54 |S_ERROR_|NOT_INIT|
|00001200| 49 41 4c 49 5a 45 44 3b | 0d 20 20 20 20 7d 0d 0d |IALIZED;|. }..|
|00001210| 20 20 20 20 73 69 64 65 | 62 61 72 55 52 4c 53 65 | side|barURLSe|
|00001220| 63 75 72 69 74 79 43 68 | 65 63 6b 28 61 43 6f 6e |curityCh|eck(aCon|
|00001230| 74 65 6e 74 55 52 4c 29 | 3b 0d 0d 20 20 20 20 2f |tentURL)|;.. /|
|00001240| 2f 20 43 72 65 61 74 65 | 20 61 20 22 63 6f 6e 74 |/ Create| a "cont|
|00001250| 61 69 6e 65 72 22 20 77 | 72 61 70 70 65 72 20 61 |ainer" w|rapper a|
|00001260| 72 6f 75 6e 64 20 74 68 | 65 20 63 75 72 72 65 6e |round th|e curren|
|00001270| 74 20 70 61 6e 65 6c 73 | 20 74 6f 0d 20 20 20 20 |t panels| to. |
|00001280| 2f 2f 20 6d 61 6e 69 70 | 75 6c 61 74 65 20 74 68 |// manip|ulate th|
|00001290| 65 20 52 44 46 3a 53 65 | 71 20 6d 6f 72 65 20 65 |e RDF:Se|q more e|
|000012a0| 61 73 69 6c 79 2e 0d 20 | 20 20 20 76 61 72 20 70 |asily.. | var p|
|000012b0| 61 6e 65 6c 5f 6c 69 73 | 74 20 3d 20 74 68 69 73 |anel_lis|t = this|
|000012c0| 2e 64 61 74 61 73 6f 75 | 72 63 65 2e 47 65 74 54 |.datasou|rce.GetT|
|000012d0| 61 72 67 65 74 28 74 68 | 69 73 2e 72 64 66 2e 47 |arget(th|is.rdf.G|
|000012e0| 65 74 52 65 73 6f 75 72 | 63 65 28 74 68 69 73 2e |etResour|ce(this.|
|000012f0| 72 65 73 6f 75 72 63 65 | 29 2c 20 74 68 69 73 2e |resource|), this.|
|00001300| 72 64 66 2e 47 65 74 52 | 65 73 6f 75 72 63 65 28 |rdf.GetR|esource(|
|00001310| 6e 73 53 69 64 65 62 61 | 72 2e 70 72 6f 74 6f 74 |nsSideba|r.protot|
|00001320| 79 70 65 2e 6e 63 2b 22 | 70 61 6e 65 6c 2d 6c 69 |ype.nc+"|panel-li|
|00001330| 73 74 22 29 2c 20 74 72 | 75 65 29 3b 0d 20 20 20 |st"), tr|ue);. |
|00001340| 20 69 66 20 28 70 61 6e | 65 6c 5f 6c 69 73 74 29 | if (pan|el_list)|
|00001350| 20 7b 0d 20 20 20 20 20 | 20 20 20 70 61 6e 65 6c | {. | panel|
|00001360| 5f 6c 69 73 74 2e 51 75 | 65 72 79 49 6e 74 65 72 |_list.Qu|eryInter|
|00001370| 66 61 63 65 28 43 6f 6d | 70 6f 6e 65 6e 74 73 2e |face(Com|ponents.|
|00001380| 69 6e 74 65 72 66 61 63 | 65 73 2e 6e 73 49 52 44 |interfac|es.nsIRD|
|00001390| 46 52 65 73 6f 75 72 63 | 65 29 3b 0d 20 20 20 20 |FResourc|e);. |
|000013a0| 7d 20 65 6c 73 65 20 7b | 0d 20 20 20 20 20 20 20 |} else {|. |
|000013b0| 20 2f 2f 20 44 61 74 61 | 73 6f 75 72 63 65 20 69 | // Data|source i|
|000013c0| 73 20 62 75 73 74 65 64 | 2e 20 53 74 61 72 74 20 |s busted|. Start |
|000013d0| 6f 76 65 72 2e 0d 20 20 | 20 20 20 20 20 20 64 65 |over.. | de|
|000013e0| 62 75 67 28 22 53 69 64 | 65 62 61 72 20 64 61 74 |bug("Sid|ebar dat|
|000013f0| 61 73 6f 75 72 63 65 20 | 69 73 20 62 75 73 74 65 |asource |is buste|
|00001400| 64 5c 6e 22 29 3b 0d 20 | 20 7d 0d 0d 20 20 20 20 |d\n");. | }.. |
|00001410| 76 61 72 20 63 6f 6e 74 | 61 69 6e 65 72 20 3d 20 |var cont|ainer = |
|00001420| 43 6f 6d 70 6f 6e 65 6e | 74 73 2e 63 6c 61 73 73 |Componen|ts.class|
|00001430| 65 73 5b 43 4f 4e 54 41 | 49 4e 45 52 5f 43 4f 4e |es[CONTA|INER_CON|
|00001440| 54 52 41 43 54 49 44 5d | 2e 63 72 65 61 74 65 49 |TRACTID]|.createI|
|00001450| 6e 73 74 61 6e 63 65 28 | 6e 73 49 52 44 46 43 6f |nstance(|nsIRDFCo|
|00001460| 6e 74 61 69 6e 65 72 29 | 3b 0d 20 20 20 20 63 6f |ntainer)|;. co|
|00001470| 6e 74 61 69 6e 65 72 2e | 49 6e 69 74 28 74 68 69 |ntainer.|Init(thi|
|00001480| 73 2e 64 61 74 61 73 6f | 75 72 63 65 2c 20 70 61 |s.dataso|urce, pa|
|00001490| 6e 65 6c 5f 6c 69 73 74 | 29 3b 0d 0d 20 20 20 20 |nel_list|);.. |
|000014a0| 2f 2a 20 43 72 65 61 74 | 65 20 61 20 72 65 73 6f |/* Creat|e a reso|
|000014b0| 75 72 63 65 20 66 6f 72 | 20 74 68 65 20 6e 65 77 |urce for| the new|
|000014c0| 20 70 61 6e 65 6c 20 61 | 6e 64 20 61 64 64 20 69 | panel a|nd add i|
|000014d0| 74 20 74 6f 20 74 68 65 | 20 6c 69 73 74 20 2a 2f |t to the| list */|
|000014e0| 0d 20 20 20 20 76 61 72 | 20 70 61 6e 65 6c 5f 72 |. var| panel_r|
|000014f0| 65 73 6f 75 72 63 65 20 | 3d 20 0d 20 20 20 20 20 |esource |= . |
|00001500| 20 20 20 74 68 69 73 2e | 72 64 66 2e 47 65 74 52 | this.|rdf.GetR|
|00001510| 65 73 6f 75 72 63 65 28 | 22 75 72 6e 3a 73 69 64 |esource(|"urn:sid|
|00001520| 65 62 61 72 3a 33 72 64 | 70 61 72 74 79 2d 70 61 |ebar:3rd|party-pa|
|00001530| 6e 65 6c 3a 22 20 2b 20 | 61 43 6f 6e 74 65 6e 74 |nel:" + |aContent|
|00001540| 55 52 4c 29 3b 0d 20 20 | 20 20 76 61 72 20 70 61 |URL);. | var pa|
|00001550| 6e 65 6c 5f 69 6e 64 65 | 78 20 3d 20 63 6f 6e 74 |nel_inde|x = cont|
|00001560| 61 69 6e 65 72 2e 49 6e | 64 65 78 4f 66 28 70 61 |ainer.In|dexOf(pa|
|00001570| 6e 65 6c 5f 72 65 73 6f | 75 72 63 65 29 3b 0d 20 |nel_reso|urce);. |
|00001580| 20 20 20 69 66 20 28 70 | 61 6e 65 6c 5f 69 6e 64 | if (p|anel_ind|
|00001590| 65 78 20 21 3d 20 2d 31 | 29 0d 20 20 20 20 7b 0d |ex != -1|). {.|
|000015a0| 20 20 20 20 20 20 20 20 | 76 61 72 20 74 69 74 6c | |var titl|
|000015b0| 65 4d 65 73 73 61 67 65 | 2c 20 64 69 61 6c 6f 67 |eMessage|, dialog|
|000015c0| 4d 65 73 73 61 67 65 3b | 0d 20 20 20 20 20 20 20 |Message;|. |
|000015d0| 20 74 72 79 20 7b 0d 20 | 20 20 20 20 20 20 20 20 | try {. | |
|000015e0| 20 20 20 76 61 72 20 73 | 74 72 69 6e 67 42 75 6e | var s|tringBun|
|000015f0| 64 6c 65 20 3d 20 67 65 | 74 53 74 72 69 6e 67 42 |dle = ge|tStringB|
|00001600| 75 6e 64 6c 65 28 22 63 | 68 72 6f 6d 65 3a 2f 2f |undle("c|hrome://|
|00001610| 63 6f 6d 6d 75 6e 69 63 | 61 74 6f 72 2f 6c 6f 63 |communic|ator/loc|
|00001620| 61 6c 65 2f 73 69 64 65 | 62 61 72 2f 73 69 64 65 |ale/side|bar/side|
|00001630| 62 61 72 2e 70 72 6f 70 | 65 72 74 69 65 73 22 29 |bar.prop|erties")|
|00001640| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 69 66 |;. | if|
|00001650| 20 28 73 74 72 69 6e 67 | 42 75 6e 64 6c 65 29 20 | (string|Bundle) |
|00001660| 7b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |{. | |
|00001670| 20 20 74 69 74 6c 65 4d | 65 73 73 61 67 65 20 3d | titleM|essage =|
|00001680| 20 73 74 72 69 6e 67 42 | 75 6e 64 6c 65 2e 47 65 | stringB|undle.Ge|
|00001690| 74 53 74 72 69 6e 67 46 | 72 6f 6d 4e 61 6d 65 28 |tStringF|romName(|
|000016a0| 22 64 75 70 65 50 61 6e | 65 6c 41 6c 65 72 74 54 |"dupePan|elAlertT|
|000016b0| 69 74 6c 65 22 29 3b 0d | 20 20 20 20 20 20 20 20 |itle");.| |
|000016c0| 20 20 20 20 20 20 20 20 | 64 69 61 6c 6f 67 4d 65 | |dialogMe|
|000016d0| 73 73 61 67 65 20 3d 20 | 73 74 72 69 6e 67 42 75 |ssage = |stringBu|
|000016e0| 6e 64 6c 65 2e 47 65 74 | 53 74 72 69 6e 67 46 72 |ndle.Get|StringFr|
|000016f0| 6f 6d 4e 61 6d 65 28 22 | 64 75 70 65 50 61 6e 65 |omName("|dupePane|
|00001700| 6c 41 6c 65 72 74 4d 65 | 73 73 61 67 65 22 29 3b |lAlertMe|ssage");|
|00001710| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001720| 20 64 69 61 6c 6f 67 4d | 65 73 73 61 67 65 20 3d | dialogM|essage =|
|00001730| 20 64 69 61 6c 6f 67 4d | 65 73 73 61 67 65 2e 72 | dialogM|essage.r|
|00001740| 65 70 6c 61 63 65 28 2f | 25 75 72 6c 25 2f 2c 20 |eplace(/|%url%/, |
|00001750| 61 43 6f 6e 74 65 6e 74 | 55 52 4c 29 3b 0d 20 20 |aContent|URL);. |
|00001760| 20 20 20 20 20 20 20 20 | 20 20 7d 0d 20 20 20 20 | | }. |
|00001770| 20 20 20 20 7d 0d 20 20 | 20 20 20 20 20 20 63 61 | }. | ca|
|00001780| 74 63 68 20 28 65 29 20 | 7b 0d 20 20 20 20 20 20 |tch (e) |{. |
|00001790| 20 20 20 20 20 20 74 69 | 74 6c 65 4d 65 73 73 61 | ti|tleMessa|
|000017a0| 67 65 20 3d 20 22 4d 79 | 20 53 69 64 65 62 61 72 |ge = "My| Sidebar|
|000017b0| 22 3b 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 64 |";. | d|
|000017c0| 69 61 6c 6f 67 4d 65 73 | 73 61 67 65 20 3d 20 61 |ialogMes|sage = a|
|000017d0| 43 6f 6e 74 65 6e 74 55 | 52 4c 20 2b 20 22 20 61 |ContentU|RL + " a|
|000017e0| 6c 72 65 61 64 79 20 65 | 78 69 73 74 73 20 69 6e |lready e|xists in|
|000017f0| 20 4d 79 20 53 69 64 65 | 62 61 72 2e 22 3b 0d 20 | My Side|bar.";. |
|00001800| 20 20 20 20 20 20 20 7d | 0d 20 20 20 20 20 20 20 | }|. |
|00001810| 20 20 20 0d 20 20 20 20 | 20 20 20 20 76 61 72 20 | . | var |
|00001820| 63 44 6c 67 53 65 72 76 | 69 63 65 20 3d 20 43 6f |cDlgServ|ice = Co|
|00001830| 6d 70 6f 6e 65 6e 74 73 | 2e 63 6c 61 73 73 65 73 |mponents|.classes|
|00001840| 5b 22 40 6d 6f 7a 69 6c | 6c 61 2e 6f 72 67 2f 61 |["@mozil|la.org/a|
|00001850| 70 70 73 68 65 6c 6c 2f | 63 6f 6d 6d 6f 6e 44 69 |ppshell/|commonDi|
|00001860| 61 6c 6f 67 73 3b 31 22 | 5d 2e 67 65 74 53 65 72 |alogs;1"|].getSer|
|00001870| 76 69 63 65 28 29 3b 0d | 20 20 20 20 20 20 20 20 |vice();.| |
|00001880| 69 66 20 28 63 44 6c 67 | 53 65 72 76 69 63 65 29 |if (cDlg|Service)|
|00001890| 20 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 63 44 | . | cD|
|000018a0| 6c 67 53 65 72 76 69 63 | 65 20 3d 20 63 44 6c 67 |lgServic|e = cDlg|
|000018b0| 53 65 72 76 69 63 65 2e | 51 75 65 72 79 49 6e 74 |Service.|QueryInt|
|000018c0| 65 72 66 61 63 65 28 43 | 6f 6d 70 6f 6e 65 6e 74 |erface(C|omponent|
|000018d0| 73 2e 69 6e 74 65 72 66 | 61 63 65 73 2e 6e 73 49 |s.interf|aces.nsI|
|000018e0| 43 6f 6d 6d 6f 6e 44 69 | 61 6c 6f 67 73 29 3b 0d |CommonDi|alogs);.|
|000018f0| 20 20 20 20 20 20 20 20 | 63 44 6c 67 53 65 72 76 | |cDlgServ|
|00001900| 69 63 65 2e 41 6c 65 72 | 74 28 74 68 69 73 2e 77 |ice.Aler|t(this.w|
|00001910| 69 6e 64 6f 77 2c 20 74 | 69 74 6c 65 4d 65 73 73 |indow, t|itleMess|
|00001920| 61 67 65 2c 20 64 69 61 | 6c 6f 67 4d 65 73 73 61 |age, dia|logMessa|
|00001930| 67 65 29 3b 0d 0d 20 20 | 20 20 20 20 20 20 72 65 |ge);.. | re|
|00001940| 74 75 72 6e 3b 0d 20 20 | 20 20 7d 0d 20 20 20 20 |turn;. | }. |
|00001950| 0d 20 20 20 20 76 61 72 | 20 74 69 74 6c 65 4d 65 |. var| titleMe|
|00001960| 73 73 61 67 65 2c 20 64 | 69 61 6c 6f 67 4d 65 73 |ssage, d|ialogMes|
|00001970| 73 61 67 65 3b 0d 20 20 | 20 20 74 72 79 20 7b 0d |sage;. | try {.|
|00001980| 20 20 20 20 20 20 20 20 | 76 61 72 20 73 74 72 69 | |var stri|
|00001990| 6e 67 42 75 6e 64 6c 65 | 20 3d 20 67 65 74 53 74 |ngBundle| = getSt|
|000019a0| 72 69 6e 67 42 75 6e 64 | 6c 65 28 22 63 68 72 6f |ringBund|le("chro|
|000019b0| 6d 65 3a 2f 2f 63 6f 6d | 6d 75 6e 69 63 61 74 6f |me://com|municato|
|000019c0| 72 2f 6c 6f 63 61 6c 65 | 2f 73 69 64 65 62 61 72 |r/locale|/sidebar|
|000019d0| 2f 73 69 64 65 62 61 72 | 2e 70 72 6f 70 65 72 74 |/sidebar|.propert|
|000019e0| 69 65 73 22 29 3b 0d 20 | 20 20 20 20 20 20 20 69 |ies");. | i|
|000019f0| 66 20 28 73 74 72 69 6e | 67 42 75 6e 64 6c 65 29 |f (strin|gBundle)|
|00001a00| 20 7b 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 74 | {. | t|
|00001a10| 69 74 6c 65 4d 65 73 73 | 61 67 65 20 3d 20 73 74 |itleMess|age = st|
|00001a20| 72 69 6e 67 42 75 6e 64 | 6c 65 2e 47 65 74 53 74 |ringBund|le.GetSt|
|00001a30| 72 69 6e 67 46 72 6f 6d | 4e 61 6d 65 28 22 61 64 |ringFrom|Name("ad|
|00001a40| 64 50 61 6e 65 6c 43 6f | 6e 66 69 72 6d 54 69 74 |dPanelCo|nfirmTit|
|00001a50| 6c 65 22 29 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |le");. | |
|00001a60| 20 20 64 69 61 6c 6f 67 | 4d 65 73 73 61 67 65 20 | dialog|Message |
|00001a70| 3d 20 73 74 72 69 6e 67 | 42 75 6e 64 6c 65 2e 47 |= string|Bundle.G|
|00001a80| 65 74 53 74 72 69 6e 67 | 46 72 6f 6d 4e 61 6d 65 |etString|FromName|
|00001a90| 28 22 61 64 64 50 61 6e | 65 6c 43 6f 6e 66 69 72 |("addPan|elConfir|
|00001aa0| 6d 4d 65 73 73 61 67 65 | 22 29 3b 0d 20 20 20 20 |mMessage|");. |
|00001ab0| 20 20 20 20 20 20 20 20 | 64 69 61 6c 6f 67 4d 65 | |dialogMe|
|00001ac0| 73 73 61 67 65 20 3d 20 | 64 69 61 6c 6f 67 4d 65 |ssage = |dialogMe|
|00001ad0| 73 73 61 67 65 2e 72 65 | 70 6c 61 63 65 28 2f 25 |ssage.re|place(/%|
|00001ae0| 74 69 74 6c 65 25 2f 2c | 20 61 54 69 74 6c 65 29 |title%/,| aTitle)|
|00001af0| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 64 69 |;. | di|
|00001b00| 61 6c 6f 67 4d 65 73 73 | 61 67 65 20 3d 20 64 69 |alogMess|age = di|
|00001b10| 61 6c 6f 67 4d 65 73 73 | 61 67 65 2e 72 65 70 6c |alogMess|age.repl|
|00001b20| 61 63 65 28 2f 25 75 72 | 6c 25 2f 2c 20 61 43 6f |ace(/%ur|l%/, aCo|
|00001b30| 6e 74 65 6e 74 55 52 4c | 29 3b 0d 20 20 20 20 20 |ntentURL|);. |
|00001b40| 20 20 20 20 20 20 20 64 | 69 61 6c 6f 67 4d 65 73 | d|ialogMes|
|00001b50| 73 61 67 65 20 3d 20 64 | 69 61 6c 6f 67 4d 65 73 |sage = d|ialogMes|
|00001b60| 73 61 67 65 2e 72 65 70 | 6c 61 63 65 28 2f 23 2f |sage.rep|lace(/#/|
|00001b70| 67 2c 20 22 5c 6e 22 29 | 3b 0d 20 20 20 20 20 20 |g, "\n")|;. |
|00001b80| 20 20 7d 0d 20 20 20 20 | 7d 0d 20 20 20 20 63 61 | }. |}. ca|
|00001b90| 74 63 68 20 28 65 29 20 | 7b 0d 20 20 20 20 20 20 |tch (e) |{. |
|00001ba0| 20 20 74 69 74 6c 65 4d | 65 73 73 61 67 65 20 3d | titleM|essage =|
|00001bb0| 20 22 41 64 64 20 54 61 | 62 20 74 6f 20 4d 79 20 | "Add Ta|b to My |
|00001bc0| 53 69 64 65 62 61 72 22 | 3b 0d 20 20 20 20 20 20 |Sidebar"|;. |
|00001bd0| 20 20 64 69 61 6c 6f 67 | 4d 65 73 73 61 67 65 20 | dialog|Message |
|00001be0| 3d 20 22 41 64 64 20 74 | 68 65 20 54 61 62 20 27 |= "Add t|he Tab '|
|00001bf0| 22 20 2b 20 61 54 69 74 | 6c 65 20 2b 20 22 27 20 |" + aTit|le + "' |
|00001c00| 74 6f 20 4d 79 20 53 69 | 64 65 62 61 72 3f 5c 6e |to My Si|debar?\n|
|00001c10| 5c 6e 22 20 2b 20 22 53 | 6f 75 72 63 65 3a 20 22 |\n" + "S|ource: "|
|00001c20| 20 2b 20 61 43 6f 6e 74 | 65 6e 74 55 52 4c 3b 0d | + aCont|entURL;.|
|00001c30| 20 20 20 20 7d 0d 20 20 | 20 20 20 20 20 20 20 20 | }. | |
|00001c40| 0d 20 20 20 20 76 61 72 | 20 63 44 6c 67 53 65 72 |. var| cDlgSer|
|00001c50| 76 69 63 65 20 3d 20 43 | 6f 6d 70 6f 6e 65 6e 74 |vice = C|omponent|
|00001c60| 73 2e 63 6c 61 73 73 65 | 73 5b 22 40 6d 6f 7a 69 |s.classe|s["@mozi|
|00001c70| 6c 6c 61 2e 6f 72 67 2f | 61 70 70 73 68 65 6c 6c |lla.org/|appshell|
|00001c80| 2f 63 6f 6d 6d 6f 6e 44 | 69 61 6c 6f 67 73 3b 31 |/commonD|ialogs;1|
|00001c90| 22 5d 2e 67 65 74 53 65 | 72 76 69 63 65 28 29 3b |"].getSe|rvice();|
|00001ca0| 0d 20 20 20 20 69 66 20 | 28 63 44 6c 67 53 65 72 |. if |(cDlgSer|
|00001cb0| 76 69 63 65 29 20 0d 20 | 20 20 20 20 20 20 20 63 |vice) . | c|
|00001cc0| 44 6c 67 53 65 72 76 69 | 63 65 20 3d 20 63 44 6c |DlgServi|ce = cDl|
|00001cd0| 67 53 65 72 76 69 63 65 | 2e 51 75 65 72 79 49 6e |gService|.QueryIn|
|00001ce0| 74 65 72 66 61 63 65 28 | 43 6f 6d 70 6f 6e 65 6e |terface(|Componen|
|00001cf0| 74 73 2e 69 6e 74 65 72 | 66 61 63 65 73 2e 6e 73 |ts.inter|faces.ns|
|00001d00| 49 43 6f 6d 6d 6f 6e 44 | 69 61 6c 6f 67 73 29 3b |ICommonD|ialogs);|
|00001d10| 0d 20 20 20 20 76 61 72 | 20 72 76 20 3d 20 63 44 |. var| rv = cD|
|00001d20| 6c 67 53 65 72 76 69 63 | 65 2e 43 6f 6e 66 69 72 |lgServic|e.Confir|
|00001d30| 6d 28 74 68 69 73 2e 77 | 69 6e 64 6f 77 2c 20 74 |m(this.w|indow, t|
|00001d40| 69 74 6c 65 4d 65 73 73 | 61 67 65 2c 20 64 69 61 |itleMess|age, dia|
|00001d50| 6c 6f 67 4d 65 73 73 61 | 67 65 29 3b 0d 20 20 20 |logMessa|ge);. |
|00001d60| 20 20 20 0d 20 20 20 20 | 69 66 20 28 21 72 76 29 | . |if (!rv)|
|00001d70| 0d 20 20 20 20 20 20 20 | 20 72 65 74 75 72 6e 3b |. | return;|
|00001d80| 0d 0d 20 20 20 20 2f 2a | 20 4e 6f 77 20 6d 61 6b |.. /*| Now mak|
|00001d90| 65 20 73 6f 6d 65 20 73 | 69 64 65 62 61 72 2d 69 |e some s|idebar-i|
|00001da0| 73 68 20 61 73 73 65 72 | 74 69 6f 6e 73 20 61 62 |sh asser|tions ab|
|00001db0| 6f 75 74 20 69 74 2e 2e | 2e 20 2a 2f 0d 20 20 20 |out it..|. */. |
|00001dc0| 20 74 68 69 73 2e 64 61 | 74 61 73 6f 75 72 63 65 | this.da|tasource|
|00001dd0| 2e 41 73 73 65 72 74 28 | 70 61 6e 65 6c 5f 72 65 |.Assert(|panel_re|
|00001de0| 73 6f 75 72 63 65 2c 0d | 20 20 20 20 20 20 20 20 |source,.| |
|00001df0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e00| 20 20 20 74 68 69 73 2e | 72 64 66 2e 47 65 74 52 | this.|rdf.GetR|
|00001e10| 65 73 6f 75 72 63 65 28 | 74 68 69 73 2e 6e 63 20 |esource(|this.nc |
|00001e20| 2b 20 22 74 69 74 6c 65 | 22 29 2c 0d 20 20 20 20 |+ "title|"),. |
|00001e30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e40| 20 20 20 20 20 20 20 74 | 68 69 73 2e 72 64 66 2e | t|his.rdf.|
|00001e50| 47 65 74 4c 69 74 65 72 | 61 6c 28 61 54 69 74 6c |GetLiter|al(aTitl|
|00001e60| 65 29 2c 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |e),. | |
|00001e70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 74 | | t|
|00001e80| 72 75 65 29 3b 0d 20 20 | 20 20 74 68 69 73 2e 64 |rue);. | this.d|
|00001e90| 61 74 61 73 6f 75 72 63 | 65 2e 41 73 73 65 72 74 |atasourc|e.Assert|
|00001ea0| 28 70 61 6e 65 6c 5f 72 | 65 73 6f 75 72 63 65 2c |(panel_r|esource,|
|00001eb0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001ec0| 20 20 20 20 20 20 20 20 | 20 20 20 20 74 68 69 73 | | this|
|00001ed0| 2e 72 64 66 2e 47 65 74 | 52 65 73 6f 75 72 63 65 |.rdf.Get|Resource|
|00001ee0| 28 74 68 69 73 2e 6e 63 | 20 2b 20 22 63 6f 6e 74 |(this.nc| + "cont|
|00001ef0| 65 6e 74 22 29 2c 0d 20 | 20 20 20 20 20 20 20 20 |ent"),. | |
|00001f00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f10| 20 20 74 68 69 73 2e 72 | 64 66 2e 47 65 74 4c 69 | this.r|df.GetLi|
|00001f20| 74 65 72 61 6c 28 61 43 | 6f 6e 74 65 6e 74 55 52 |teral(aC|ontentUR|
|00001f30| 4c 29 2c 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |L),. | |
|00001f40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 74 | | t|
|00001f50| 72 75 65 29 3b 0d 20 20 | 20 20 69 66 20 28 61 43 |rue);. | if (aC|
|00001f60| 75 73 74 6f 6d 69 7a 65 | 55 52 4c 29 0d 20 20 20 |ustomize|URL). |
|00001f70| 20 20 20 20 20 74 68 69 | 73 2e 64 61 74 61 73 6f | thi|s.dataso|
|00001f80| 75 72 63 65 2e 41 73 73 | 65 72 74 28 70 61 6e 65 |urce.Ass|ert(pane|
|00001f90| 6c 5f 72 65 73 6f 75 72 | 63 65 2c 0d 20 20 20 20 |l_resour|ce,. |
|00001fa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001fb0| 20 20 20 20 20 20 20 20 | 20 20 20 74 68 69 73 2e | | this.|
|00001fc0| 72 64 66 2e 47 65 74 52 | 65 73 6f 75 72 63 65 28 |rdf.GetR|esource(|
|00001fd0| 74 68 69 73 2e 6e 63 20 | 2b 20 22 63 75 73 74 6f |this.nc |+ "custo|
|00001fe0| 6d 69 7a 65 22 29 2c 0d | 20 20 20 20 20 20 20 20 |mize"),.| |
|00001ff0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002000| 20 20 20 20 20 20 20 74 | 68 69 73 2e 72 64 66 2e | t|his.rdf.|
|00002010| 47 65 74 4c 69 74 65 72 | 61 6c 28 61 43 75 73 74 |GetLiter|al(aCust|
|00002020| 6f 6d 69 7a 65 55 52 4c | 29 2c 0d 20 20 20 20 20 |omizeURL|),. |
|00002030| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002040| 20 20 20 20 20 20 20 20 | 20 20 74 72 75 65 29 3b | | true);|
|00002050| 0d 20 20 20 20 20 20 20 | 20 0d 20 20 20 20 63 6f |. | . co|
|00002060| 6e 74 61 69 6e 65 72 2e | 41 70 70 65 6e 64 45 6c |ntainer.|AppendEl|
|00002070| 65 6d 65 6e 74 28 70 61 | 6e 65 6c 5f 72 65 73 6f |ement(pa|nel_reso|
|00002080| 75 72 63 65 29 3b 0d 0d | 20 20 20 20 2f 2f 20 55 |urce);..| // U|
|00002090| 73 65 20 61 6e 20 61 73 | 73 65 72 74 69 6f 6e 20 |se an as|sertion |
|000020a0| 74 6f 20 70 61 73 73 20 | 61 20 22 72 65 66 72 65 |to pass |a "refre|
|000020b0| 73 68 22 20 65 76 65 6e | 74 20 74 6f 20 61 6c 6c |sh" even|t to all|
|000020c0| 20 74 68 65 20 73 69 64 | 65 62 61 72 73 2e 0d 20 | the sid|ebars.. |
|000020d0| 20 20 20 2f 2f 20 54 68 | 65 79 20 75 73 65 20 6f | // Th|ey use o|
|000020e0| 62 73 65 72 76 65 72 73 | 20 74 6f 20 77 61 74 63 |bservers| to watc|
|000020f0| 68 20 66 6f 72 20 74 68 | 69 73 20 61 73 73 65 72 |h for th|is asser|
|00002100| 74 69 6f 6e 20 28 69 6e | 20 73 69 64 65 62 61 72 |tion (in| sidebar|
|00002110| 4f 76 65 72 6c 61 79 2e | 6a 73 29 2e 0d 20 20 20 |Overlay.|js).. |
|00002120| 20 74 68 69 73 2e 64 61 | 74 61 73 6f 75 72 63 65 | this.da|tasource|
|00002130| 2e 41 73 73 65 72 74 28 | 74 68 69 73 2e 72 64 66 |.Assert(|this.rdf|
|00002140| 2e 47 65 74 52 65 73 6f | 75 72 63 65 28 74 68 69 |.GetReso|urce(thi|
|00002150| 73 2e 72 65 73 6f 75 72 | 63 65 29 2c 0d 20 20 20 |s.resour|ce),. |
|00002160| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002170| 20 20 20 20 20 20 20 20 | 74 68 69 73 2e 72 64 66 | |this.rdf|
|00002180| 2e 47 65 74 52 65 73 6f | 75 72 63 65 28 74 68 69 |.GetReso|urce(thi|
|00002190| 73 2e 6e 63 20 2b 20 22 | 72 65 66 72 65 73 68 22 |s.nc + "|refresh"|
|000021a0| 29 2c 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |),. | |
|000021b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 74 68 | | th|
|000021c0| 69 73 2e 72 64 66 2e 47 | 65 74 4c 69 74 65 72 61 |is.rdf.G|etLitera|
|000021d0| 6c 28 22 74 72 75 65 22 | 29 2c 0d 20 20 20 20 20 |l("true"|),. |
|000021e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000021f0| 20 20 20 20 20 20 74 72 | 75 65 29 3b 0d 20 20 20 | tr|ue);. |
|00002200| 20 74 68 69 73 2e 64 61 | 74 61 73 6f 75 72 63 65 | this.da|tasource|
|00002210| 2e 55 6e 61 73 73 65 72 | 74 28 74 68 69 73 2e 72 |.Unasser|t(this.r|
|00002220| 64 66 2e 47 65 74 52 65 | 73 6f 75 72 63 65 28 74 |df.GetRe|source(t|
|00002230| 68 69 73 2e 72 65 73 6f | 75 72 63 65 29 2c 0d 20 |his.reso|urce),. |
|00002240| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002250| 20 20 20 20 20 20 20 20 | 20 20 20 20 74 68 69 73 | | this|
|00002260| 2e 72 64 66 2e 47 65 74 | 52 65 73 6f 75 72 63 65 |.rdf.Get|Resource|
|00002270| 28 74 68 69 73 2e 6e 63 | 20 2b 20 22 72 65 66 72 |(this.nc| + "refr|
|00002280| 65 73 68 22 29 2c 0d 20 | 20 20 20 20 20 20 20 20 |esh"),. | |
|00002290| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000022a0| 20 20 20 20 74 68 69 73 | 2e 72 64 66 2e 47 65 74 | this|.rdf.Get|
|000022b0| 4c 69 74 65 72 61 6c 28 | 22 74 72 75 65 22 29 29 |Literal(|"true"))|
|000022c0| 3b 0d 0d 20 20 20 20 2f | 2a 20 57 72 69 74 65 20 |;.. /|* Write |
|000022d0| 74 68 65 20 6d 6f 64 69 | 66 69 65 64 20 70 61 6e |the modi|fied pan|
|000022e0| 65 6c 73 20 6f 75 74 2e | 20 2a 2f 0d 20 20 20 20 |els out.| */. |
|000022f0| 74 68 69 73 2e 64 61 74 | 61 73 6f 75 72 63 65 2e |this.dat|asource.|
|00002300| 51 75 65 72 79 49 6e 74 | 65 72 66 61 63 65 28 6e |QueryInt|erface(n|
|00002310| 73 49 52 44 46 52 65 6d | 6f 74 65 44 61 74 61 53 |sIRDFRem|oteDataS|
|00002320| 6f 75 72 63 65 29 2e 46 | 6c 75 73 68 28 29 3b 0d |ource).F|lush();.|
|00002330| 0d 7d 0d 0d 2f 2a 20 64 | 65 63 6f 72 61 74 65 20 |.}../* d|ecorate |
|00002340| 70 72 6f 74 6f 74 79 70 | 65 20 74 6f 20 70 72 6f |prototyp|e to pro|
|00002350| 76 69 64 65 20 60 60 63 | 6c 61 73 73 27 27 20 6d |vide ``c|lass'' m|
|00002360| 65 74 68 6f 64 73 20 61 | 6e 64 20 70 72 6f 70 65 |ethods a|nd prope|
|00002370| 72 74 79 20 61 63 63 65 | 73 73 6f 72 73 20 2a 2f |rty acce|ssors */|
|00002380| 0d 6e 73 53 69 64 65 62 | 61 72 2e 70 72 6f 74 6f |.nsSideb|ar.proto|
|00002390| 74 79 70 65 2e 61 64 64 | 53 65 61 72 63 68 45 6e |type.add|SearchEn|
|000023a0| 67 69 6e 65 20 3d 0d 66 | 75 6e 63 74 69 6f 6e 20 |gine =.f|unction |
|000023b0| 28 65 6e 67 69 6e 65 55 | 52 4c 2c 20 69 63 6f 6e |(engineU|RL, icon|
|000023c0| 55 52 4c 2c 20 73 75 67 | 67 65 73 74 65 64 54 69 |URL, sug|gestedTi|
|000023d0| 74 6c 65 2c 20 73 75 67 | 67 65 73 74 65 64 43 61 |tle, sug|gestedCa|
|000023e0| 74 65 67 6f 72 79 29 0d | 7b 0d 20 20 20 20 64 65 |tegory).|{. de|
|000023f0| 62 75 67 28 22 61 64 64 | 53 65 61 72 63 68 45 6e |bug("add|SearchEn|
|00002400| 67 69 6e 65 28 22 20 2b | 20 65 6e 67 69 6e 65 55 |gine(" +| engineU|
|00002410| 52 4c 20 2b 20 22 2c 20 | 22 20 2b 20 69 63 6f 6e |RL + ", |" + icon|
|00002420| 55 52 4c 20 2b 20 22 2c | 20 22 20 2b 0d 20 20 20 |URL + ",| " +. |
|00002430| 20 20 20 20 20 20 20 73 | 75 67 67 65 73 74 65 64 | s|uggested|
|00002440| 43 61 74 65 67 6f 72 79 | 20 2b 20 22 2c 20 22 20 |Category| + ", " |
|00002450| 2b 20 73 75 67 67 65 73 | 74 65 64 54 69 74 6c 65 |+ sugges|tedTitle|
|00002460| 20 2b 20 22 29 22 29 3b | 0d 0d 20 20 20 20 69 66 | + ")");|.. if|
|00002470| 20 28 21 74 68 69 73 2e | 77 69 6e 64 6f 77 29 0d | (!this.|window).|
|00002480| 20 20 20 20 7b 0d 20 20 | 20 20 20 20 20 20 64 65 | {. | de|
|00002490| 62 75 67 20 28 22 6e 6f | 20 77 69 6e 64 6f 77 20 |bug ("no| window |
|000024a0| 6f 62 6a 65 63 74 20 73 | 65 74 2c 20 62 61 69 6c |object s|et, bail|
|000024b0| 69 6e 67 20 6f 75 74 2e | 22 29 3b 0d 20 20 20 20 |ing out.|");. |
|000024c0| 20 20 20 20 74 68 72 6f | 77 20 43 6f 6d 70 6f 6e | thro|w Compon|
|000024d0| 65 6e 74 73 2e 72 65 73 | 75 6c 74 73 2e 4e 53 5f |ents.res|ults.NS_|
|000024e0| 45 52 52 4f 52 5f 4e 4f | 54 5f 49 4e 49 54 49 41 |ERROR_NO|T_INITIA|
|000024f0| 4c 49 5a 45 44 3b 0d 20 | 20 20 20 7d 0d 0d 20 20 |LIZED;. | }.. |
|00002500| 20 20 74 72 79 0d 20 20 | 20 20 7b 0d 09 20 20 20 | try. | {.. |
|00002510| 20 2f 2f 20 6d 61 6b 65 | 20 73 75 72 65 20 75 73 | // make| sure us|
|00002520| 69 6e 67 20 48 54 54 50 | 20 28 66 6f 72 20 62 6f |ing HTTP| (for bo|
|00002530| 74 68 20 65 6e 67 69 6e | 65 20 61 73 20 77 65 6c |th engin|e as wel|
|00002540| 6c 20 61 73 20 69 63 6f | 6e 20 55 52 4c 73 29 0d |l as ico|n URLs).|
|00002550| 0d 09 20 20 20 20 69 66 | 20 28 65 6e 67 69 6e 65 |.. if| (engine|
|00002560| 55 52 4c 2e 73 65 61 72 | 63 68 28 2f 5e 68 74 74 |URL.sear|ch(/^htt|
|00002570| 70 3a 5c 2f 5c 2f 2f 69 | 29 20 3d 3d 20 2d 31 29 |p:\/\//i|) == -1)|
|00002580| 0d 09 20 20 20 20 7b 0d | 09 20 20 20 20 20 20 20 |.. {.|. |
|00002590| 20 64 65 62 75 67 20 28 | 22 6d 75 73 74 20 75 73 | debug (|"must us|
|000025a0| 65 20 48 54 54 50 20 74 | 6f 20 66 65 74 63 68 20 |e HTTP t|o fetch |
|000025b0| 73 65 61 72 63 68 20 65 | 6e 67 69 6e 65 20 66 69 |search e|ngine fi|
|000025c0| 6c 65 22 29 3b 0d 09 20 | 20 20 20 20 20 20 20 74 |le");.. | t|
|000025d0| 68 72 6f 77 20 43 6f 6d | 70 6f 6e 65 6e 74 73 2e |hrow Com|ponents.|
|000025e0| 72 65 73 75 6c 74 73 2e | 4e 53 5f 45 52 52 4f 52 |results.|NS_ERROR|
|000025f0| 5f 49 4e 56 41 4c 49 44 | 5f 41 52 47 3b 0d 09 20 |_INVALID|_ARG;.. |
|00002600| 20 20 20 7d 0d 0d 09 20 | 20 20 20 69 66 20 28 69 | }... | if (i|
|00002610| 63 6f 6e 55 52 4c 2e 73 | 65 61 72 63 68 28 2f 5e |conURL.s|earch(/^|
|00002620| 68 74 74 70 3a 5c 2f 5c | 2f 2f 69 29 20 3d 3d 20 |http:\/\|//i) == |
|00002630| 2d 31 29 0d 09 20 20 20 | 20 7b 0d 09 20 20 20 20 |-1).. | {.. |
|00002640| 20 20 20 20 64 65 62 75 | 67 20 28 22 6d 75 73 74 | debu|g ("must|
|00002650| 20 75 73 65 20 48 54 54 | 50 20 74 6f 20 66 65 74 | use HTT|P to fet|
|00002660| 63 68 20 73 65 61 72 63 | 68 20 69 63 6f 6e 20 66 |ch searc|h icon f|
|00002670| 69 6c 65 22 29 3b 0d 09 | 20 20 20 20 20 20 20 20 |ile");..| |
|00002680| 74 68 72 6f 77 20 43 6f | 6d 70 6f 6e 65 6e 74 73 |throw Co|mponents|
|00002690| 2e 72 65 73 75 6c 74 73 | 2e 4e 53 5f 45 52 52 4f |.results|.NS_ERRO|
|000026a0| 52 5f 49 4e 56 41 4c 49 | 44 5f 41 52 47 3b 0d 09 |R_INVALI|D_ARG;..|
|000026b0| 20 20 20 20 7d 0d 0d 09 | 20 20 20 20 2f 2f 20 6d | }...| // m|
|000026c0| 61 6b 65 20 73 75 72 65 | 20 65 6e 67 69 6e 65 55 |ake sure| engineU|
|000026d0| 52 4c 20 72 65 66 65 72 | 73 20 74 6f 20 61 20 2e |RL refer|s to a .|
|000026e0| 73 72 63 20 66 69 6c 65 | 0d 09 20 20 20 20 69 66 |src file|.. if|
|000026f0| 20 28 65 6e 67 69 6e 65 | 55 52 4c 2e 73 65 61 72 | (engine|URL.sear|
|00002700| 63 68 28 2f 5c 2e 73 72 | 63 24 2f 69 29 20 3d 3d |ch(/\.sr|c$/i) ==|
|00002710| 20 2d 31 29 0d 09 20 20 | 20 20 7b 0d 09 20 20 20 | -1).. | {.. |
|00002720| 20 20 20 20 20 64 65 62 | 75 67 20 28 22 65 6e 67 | deb|ug ("eng|
|00002730| 69 6e 65 55 52 4c 20 64 | 6f 65 73 6e 27 74 20 72 |ineURL d|oesn't r|
|00002740| 65 66 65 72 65 6e 63 65 | 20 61 20 2e 73 72 63 20 |eference| a .src |
|00002750| 66 69 6c 65 22 29 3b 0d | 09 20 20 20 20 20 20 20 |file");.|. |
|00002760| 20 74 68 72 6f 77 20 43 | 6f 6d 70 6f 6e 65 6e 74 | throw C|omponent|
|00002770| 73 2e 72 65 73 75 6c 74 | 73 2e 4e 53 5f 45 52 52 |s.result|s.NS_ERR|
|00002780| 4f 52 5f 49 4e 56 41 4c | 49 44 5f 41 52 47 3b 0d |OR_INVAL|ID_ARG;.|
|00002790| 09 20 20 20 20 7d 0d 0d | 09 20 20 20 20 2f 2f 20 |. }..|. // |
|000027a0| 6d 61 6b 65 20 73 75 72 | 65 20 69 63 6f 6e 55 52 |make sur|e iconUR|
|000027b0| 4c 20 72 65 66 65 72 73 | 20 74 6f 20 61 20 2e 67 |L refers| to a .g|
|000027c0| 69 66 2f 2e 6a 70 67 2f | 2e 6a 70 65 67 2f 2e 70 |if/.jpg/|.jpeg/.p|
|000027d0| 6e 67 20 66 69 6c 65 0d | 09 20 20 20 20 69 66 20 |ng file.|. if |
|000027e0| 28 69 63 6f 6e 55 52 4c | 2e 73 65 61 72 63 68 28 |(iconURL|.search(|
|000027f0| 2f 5c 2e 28 67 69 66 7c | 6a 70 67 7c 6a 70 65 67 |/\.(gif||jpg|jpeg|
|00002800| 7c 70 6e 67 29 24 2f 69 | 29 20 3d 3d 20 2d 31 29 ||png)$/i|) == -1)|
|00002810| 0d 09 20 20 20 20 7b 0d | 09 20 20 20 20 20 20 20 |.. {.|. |
|00002820| 20 64 65 62 75 67 20 28 | 22 69 63 6f 6e 55 52 4c | debug (|"iconURL|
|00002830| 20 64 6f 65 73 6e 27 74 | 20 72 65 66 65 72 65 6e | doesn't| referen|
|00002840| 63 65 20 61 20 73 75 70 | 70 6f 72 74 65 64 20 69 |ce a sup|ported i|
|00002850| 6d 61 67 65 20 66 69 6c | 65 22 29 3b 0d 09 20 20 |mage fil|e");.. |
|00002860| 20 20 20 20 20 20 74 68 | 72 6f 77 20 43 6f 6d 70 | th|row Comp|
|00002870| 6f 6e 65 6e 74 73 2e 72 | 65 73 75 6c 74 73 2e 4e |onents.r|esults.N|
|00002880| 53 5f 45 52 52 4f 52 5f | 49 4e 56 41 4c 49 44 5f |S_ERROR_|INVALID_|
|00002890| 41 52 47 3b 0d 09 20 20 | 20 20 7d 0d 0d 20 20 20 |ARG;.. | }.. |
|000028a0| 20 7d 0d 20 20 20 20 63 | 61 74 63 68 28 65 78 29 | }. c|atch(ex)|
|000028b0| 0d 20 20 20 20 7b 0d 20 | 20 20 20 20 20 20 20 74 |. {. | t|
|000028c0| 68 69 73 2e 77 69 6e 64 | 6f 77 2e 61 6c 65 72 74 |his.wind|ow.alert|
|000028d0| 28 22 46 61 69 6c 65 64 | 20 74 6f 20 61 64 64 20 |("Failed| to add |
|000028e0| 74 68 65 20 73 65 61 72 | 63 68 20 65 6e 67 69 6e |the sear|ch engin|
|000028f0| 65 2e 5c 6e 22 29 3b 0d | 20 20 20 20 20 20 20 20 |e.\n");.| |
|00002900| 74 68 72 6f 77 20 43 6f | 6d 70 6f 6e 65 6e 74 73 |throw Co|mponents|
|00002910| 2e 72 65 73 75 6c 74 73 | 2e 4e 53 5f 45 52 52 4f |.results|.NS_ERRO|
|00002920| 52 5f 49 4e 56 41 4c 49 | 44 5f 41 52 47 3b 0d 20 |R_INVALI|D_ARG;. |
|00002930| 20 20 20 7d 0d 0d 20 20 | 20 20 76 61 72 20 74 69 | }.. | var ti|
|00002940| 74 6c 65 4d 65 73 73 61 | 67 65 2c 20 64 69 61 6c |tleMessa|ge, dial|
|00002950| 6f 67 4d 65 73 73 61 67 | 65 3b 0d 20 20 20 20 74 |ogMessag|e;. t|
|00002960| 72 79 20 7b 0d 20 20 20 | 20 20 20 20 20 76 61 72 |ry {. | var|
|00002970| 20 73 74 72 69 6e 67 42 | 75 6e 64 6c 65 20 3d 20 | stringB|undle = |
|00002980| 67 65 74 53 74 72 69 6e | 67 42 75 6e 64 6c 65 28 |getStrin|gBundle(|
|00002990| 22 63 68 72 6f 6d 65 3a | 2f 2f 63 6f 6d 6d 75 6e |"chrome:|//commun|
|000029a0| 69 63 61 74 6f 72 2f 6c | 6f 63 61 6c 65 2f 73 69 |icator/l|ocale/si|
|000029b0| 64 65 62 61 72 2f 73 69 | 64 65 62 61 72 2e 70 72 |debar/si|debar.pr|
|000029c0| 6f 70 65 72 74 69 65 73 | 22 29 3b 0d 20 20 20 20 |operties|");. |
|000029d0| 20 20 20 20 69 66 20 28 | 73 74 72 69 6e 67 42 75 | if (|stringBu|
|000029e0| 6e 64 6c 65 29 20 7b 0d | 20 20 20 20 20 20 20 20 |ndle) {.| |
|000029f0| 20 20 20 20 74 69 74 6c | 65 4d 65 73 73 61 67 65 | titl|eMessage|
|00002a00| 20 3d 20 73 74 72 69 6e | 67 42 75 6e 64 6c 65 2e | = strin|gBundle.|
|00002a10| 47 65 74 53 74 72 69 6e | 67 46 72 6f 6d 4e 61 6d |GetStrin|gFromNam|
|00002a20| 65 28 22 61 64 64 45 6e | 67 69 6e 65 43 6f 6e 66 |e("addEn|gineConf|
|00002a30| 69 72 6d 54 69 74 6c 65 | 22 29 3b 0d 20 20 20 20 |irmTitle|");. |
|00002a40| 20 20 20 20 20 20 20 20 | 64 69 61 6c 6f 67 4d 65 | |dialogMe|
|00002a50| 73 73 61 67 65 20 3d 20 | 73 74 72 69 6e 67 42 75 |ssage = |stringBu|
|00002a60| 6e 64 6c 65 2e 47 65 74 | 53 74 72 69 6e 67 46 72 |ndle.Get|StringFr|
|00002a70| 6f 6d 4e 61 6d 65 28 22 | 61 64 64 45 6e 67 69 6e |omName("|addEngin|
|00002a80| 65 43 6f 6e 66 69 72 6d | 4d 65 73 73 61 67 65 22 |eConfirm|Message"|
|00002a90| 29 3b 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 64 |);. | d|
|00002aa0| 69 61 6c 6f 67 4d 65 73 | 73 61 67 65 20 3d 20 64 |ialogMes|sage = d|
|00002ab0| 69 61 6c 6f 67 4d 65 73 | 73 61 67 65 2e 72 65 70 |ialogMes|sage.rep|
|00002ac0| 6c 61 63 65 28 2f 25 74 | 69 74 6c 65 25 2f 2c 20 |lace(/%t|itle%/, |
|00002ad0| 73 75 67 67 65 73 74 65 | 64 54 69 74 6c 65 29 3b |suggeste|dTitle);|
|00002ae0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 64 69 61 |. | dia|
|00002af0| 6c 6f 67 4d 65 73 73 61 | 67 65 20 3d 20 64 69 61 |logMessa|ge = dia|
|00002b00| 6c 6f 67 4d 65 73 73 61 | 67 65 2e 72 65 70 6c 61 |logMessa|ge.repla|
|00002b10| 63 65 28 2f 25 63 61 74 | 65 67 6f 72 79 25 2f 2c |ce(/%cat|egory%/,|
|00002b20| 20 73 75 67 67 65 73 74 | 65 64 43 61 74 65 67 6f | suggest|edCatego|
|00002b30| 72 79 29 3b 0d 20 20 20 | 20 20 20 20 20 20 20 20 |ry);. | |
|00002b40| 20 64 69 61 6c 6f 67 4d | 65 73 73 61 67 65 20 3d | dialogM|essage =|
|00002b50| 20 64 69 61 6c 6f 67 4d | 65 73 73 61 67 65 2e 72 | dialogM|essage.r|
|00002b60| 65 70 6c 61 63 65 28 2f | 25 75 72 6c 25 2f 2c 20 |eplace(/|%url%/, |
|00002b70| 65 6e 67 69 6e 65 55 52 | 4c 29 3b 0d 20 20 20 20 |engineUR|L);. |
|00002b80| 20 20 20 20 20 20 20 20 | 64 69 61 6c 6f 67 4d 65 | |dialogMe|
|00002b90| 73 73 61 67 65 20 3d 20 | 64 69 61 6c 6f 67 4d 65 |ssage = |dialogMe|
|00002ba0| 73 73 61 67 65 2e 72 65 | 70 6c 61 63 65 28 2f 23 |ssage.re|place(/#|
|00002bb0| 2f 67 2c 20 22 5c 6e 22 | 29 3b 0d 20 20 20 20 20 |/g, "\n"|);. |
|00002bc0| 20 20 20 7d 0d 20 20 20 | 20 7d 0d 20 20 20 20 63 | }. | }. c|
|00002bd0| 61 74 63 68 20 28 65 29 | 20 7b 0d 20 20 20 20 20 |atch (e)| {. |
|00002be0| 20 20 20 74 69 74 6c 65 | 4d 65 73 73 61 67 65 20 | title|Message |
|00002bf0| 3d 20 22 41 64 64 20 53 | 65 61 72 63 68 20 45 6e |= "Add S|earch En|
|00002c00| 67 69 6e 65 22 3b 0d 20 | 20 20 20 20 20 20 20 64 |gine";. | d|
|00002c10| 69 61 6c 6f 67 4d 65 73 | 73 61 67 65 20 3d 20 22 |ialogMes|sage = "|
|00002c20| 41 64 64 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |Add the |followin|
|00002c30| 67 20 73 65 61 72 63 68 | 20 65 6e 67 69 6e 65 3f |g search| engine?|
|00002c40| 5c 6e 5c 6e 4e 61 6d 65 | 3a 20 22 20 2b 20 73 75 |\n\nName|: " + su|
|00002c50| 67 67 65 73 74 65 64 54 | 69 74 6c 65 3b 0d 20 20 |ggestedT|itle;. |
|00002c60| 20 20 20 20 20 20 64 69 | 61 6c 6f 67 4d 65 73 73 | di|alogMess|
|00002c70| 61 67 65 20 2b 3d 20 22 | 5c 6e 53 65 61 72 63 68 |age += "|\nSearch|
|00002c80| 20 43 61 74 65 67 6f 72 | 79 3a 20 22 20 2b 20 73 | Categor|y: " + s|
|00002c90| 75 67 67 65 73 74 65 64 | 43 61 74 65 67 6f 72 79 |uggested|Category|
|00002ca0| 3b 0d 20 20 20 20 20 20 | 20 20 64 69 61 6c 6f 67 |;. | dialog|
|00002cb0| 4d 65 73 73 61 67 65 20 | 2b 3d 20 22 5c 6e 53 6f |Message |+= "\nSo|
|00002cc0| 75 72 63 65 3a 20 22 20 | 2b 20 65 6e 67 69 6e 65 |urce: " |+ engine|
|00002cd0| 55 52 4c 3b 0d 20 20 20 | 20 7d 0d 20 20 20 20 20 |URL;. | }. |
|00002ce0| 20 20 20 20 20 0d 20 20 | 20 20 76 61 72 20 63 44 | . | var cD|
|00002cf0| 6c 67 53 65 72 76 69 63 | 65 20 3d 20 43 6f 6d 70 |lgServic|e = Comp|
|00002d00| 6f 6e 65 6e 74 73 2e 63 | 6c 61 73 73 65 73 5b 22 |onents.c|lasses["|
|00002d10| 40 6d 6f 7a 69 6c 6c 61 | 2e 6f 72 67 2f 61 70 70 |@mozilla|.org/app|
|00002d20| 73 68 65 6c 6c 2f 63 6f | 6d 6d 6f 6e 44 69 61 6c |shell/co|mmonDial|
|00002d30| 6f 67 73 3b 31 22 5d 2e | 67 65 74 53 65 72 76 69 |ogs;1"].|getServi|
|00002d40| 63 65 28 29 3b 0d 20 20 | 20 20 69 66 20 28 63 44 |ce();. | if (cD|
|00002d50| 6c 67 53 65 72 76 69 63 | 65 29 20 0d 20 20 20 20 |lgServic|e) . |
|00002d60| 20 20 20 20 63 44 6c 67 | 53 65 72 76 69 63 65 20 | cDlg|Service |
|00002d70| 3d 20 63 44 6c 67 53 65 | 72 76 69 63 65 2e 51 75 |= cDlgSe|rvice.Qu|
|00002d80| 65 72 79 49 6e 74 65 72 | 66 61 63 65 28 43 6f 6d |eryInter|face(Com|
|00002d90| 70 6f 6e 65 6e 74 73 2e | 69 6e 74 65 72 66 61 63 |ponents.|interfac|
|00002da0| 65 73 2e 6e 73 49 43 6f | 6d 6d 6f 6e 44 69 61 6c |es.nsICo|mmonDial|
|00002db0| 6f 67 73 29 3b 0d 20 20 | 20 20 76 61 72 20 72 76 |ogs);. | var rv|
|00002dc0| 20 3d 20 63 44 6c 67 53 | 65 72 76 69 63 65 2e 43 | = cDlgS|ervice.C|
|00002dd0| 6f 6e 66 69 72 6d 28 74 | 68 69 73 2e 77 69 6e 64 |onfirm(t|his.wind|
|00002de0| 6f 77 2c 20 74 69 74 6c | 65 4d 65 73 73 61 67 65 |ow, titl|eMessage|
|00002df0| 2c 20 64 69 61 6c 6f 67 | 4d 65 73 73 61 67 65 29 |, dialog|Message)|
|00002e00| 3b 0d 20 20 20 20 20 20 | 0d 20 20 20 20 69 66 20 |;. |. if |
|00002e10| 28 21 72 76 29 0d 20 20 | 20 20 20 20 20 20 72 65 |(!rv). | re|
|00002e20| 74 75 72 6e 3b 0d 0d 20 | 20 20 20 76 61 72 20 69 |turn;.. | var i|
|00002e30| 6e 74 65 72 6e 65 74 53 | 65 61 72 63 68 20 3d 20 |nternetS|earch = |
|00002e40| 43 6f 6d 70 6f 6e 65 6e | 74 73 2e 63 6c 61 73 73 |Componen|ts.class|
|00002e50| 65 73 5b 4e 45 54 53 45 | 41 52 43 48 5f 43 4f 4e |es[NETSE|ARCH_CON|
|00002e60| 54 52 41 43 54 49 44 5d | 2e 67 65 74 53 65 72 76 |TRACTID]|.getServ|
|00002e70| 69 63 65 28 29 3b 0d 20 | 20 20 20 69 66 20 28 69 |ice();. | if (i|
|00002e80| 6e 74 65 72 6e 65 74 53 | 65 61 72 63 68 29 09 0d |nternetS|earch)..|
|00002e90| 20 20 20 20 20 20 20 20 | 69 6e 74 65 72 6e 65 74 | |internet|
|00002ea0| 53 65 61 72 63 68 20 3d | 20 69 6e 74 65 72 6e 65 |Search =| interne|
|00002eb0| 74 53 65 61 72 63 68 2e | 51 75 65 72 79 49 6e 74 |tSearch.|QueryInt|
|00002ec0| 65 72 66 61 63 65 28 6e | 73 49 49 6e 74 65 72 6e |erface(n|sIIntern|
|00002ed0| 65 74 53 65 61 72 63 68 | 53 65 72 76 69 63 65 29 |etSearch|Service)|
|00002ee0| 3b 0d 20 20 20 20 69 66 | 20 28 69 6e 74 65 72 6e |;. if| (intern|
|00002ef0| 65 74 53 65 61 72 63 68 | 29 0d 20 20 20 20 7b 0d |etSearch|). {.|
|00002f00| 20 20 20 20 09 69 6e 74 | 65 72 6e 65 74 53 65 61 | .int|ernetSea|
|00002f10| 72 63 68 2e 41 64 64 53 | 65 61 72 63 68 45 6e 67 |rch.AddS|earchEng|
|00002f20| 69 6e 65 28 65 6e 67 69 | 6e 65 55 52 4c 2c 20 69 |ine(engi|neURL, i|
|00002f30| 63 6f 6e 55 52 4c 2c 20 | 73 75 67 67 65 73 74 65 |conURL, |suggeste|
|00002f40| 64 54 69 74 6c 65 2c 0d | 20 20 20 20 20 20 20 20 |dTitle,.| |
|00002f50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002f60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 73 | | s|
|00002f70| 75 67 67 65 73 74 65 64 | 43 61 74 65 67 6f 72 79 |uggested|Category|
|00002f80| 29 3b 0d 20 20 20 20 7d | 0d 7d 0d 0d 2f 2f 20 6d |);. }|.}..// m|
|00002f90| 65 74 68 6f 64 20 6f 66 | 20 6e 73 49 53 65 63 75 |ethod of| nsISecu|
|00002fa0| 72 69 74 79 43 68 65 63 | 6b 65 64 43 6f 6d 70 6f |rityChec|kedCompo|
|00002fb0| 6e 65 6e 74 0d 6e 73 53 | 69 64 65 62 61 72 2e 70 |nent.nsS|idebar.p|
|00002fc0| 72 6f 74 6f 74 79 70 65 | 2e 63 61 6e 43 72 65 61 |rototype|.canCrea|
|00002fd0| 74 65 57 72 61 70 70 65 | 72 20 3d 0d 66 75 6e 63 |teWrappe|r =.func|
|00002fe0| 74 69 6f 6e 20 28 69 69 | 64 29 20 7b 0d 20 20 20 |tion (ii|d) {. |
|00002ff0| 20 72 65 74 75 72 6e 20 | 22 4e 6f 41 63 63 65 73 | return |"NoAcces|
|00003000| 73 22 3b 0d 7d 0d 0d 2f | 2f 20 6d 65 74 68 6f 64 |s";.}../|/ method|
|00003010| 20 6f 66 20 6e 73 49 53 | 65 63 75 72 69 74 79 43 | of nsIS|ecurityC|
|00003020| 68 65 63 6b 65 64 43 6f | 6d 70 6f 6e 65 6e 74 0d |heckedCo|mponent.|
|00003030| 6e 73 53 69 64 65 62 61 | 72 2e 70 72 6f 74 6f 74 |nsSideba|r.protot|
|00003040| 79 70 65 2e 63 61 6e 43 | 61 6c 6c 4d 65 74 68 6f |ype.canC|allMetho|
|00003050| 64 20 3d 0d 66 75 6e 63 | 74 69 6f 6e 20 28 69 69 |d =.func|tion (ii|
|00003060| 64 2c 20 6d 65 74 68 6f | 64 4e 61 6d 65 29 20 7b |d, metho|dName) {|
|00003070| 0d 20 20 20 20 69 66 20 | 28 69 69 64 2e 65 71 75 |. if |(iid.equ|
|00003080| 61 6c 73 28 6e 73 49 53 | 69 64 65 62 61 72 29 20 |als(nsIS|idebar) |
|00003090| 26 26 0d 20 20 20 20 20 | 20 20 20 28 6d 65 74 68 |&&. | (meth|
|000030a0| 6f 64 4e 61 6d 65 20 3d | 3d 20 22 73 65 74 57 69 |odName =|= "setWi|
|000030b0| 6e 64 6f 77 22 20 7c 7c | 0d 20 20 20 20 20 20 20 |ndow" |||. |
|000030c0| 20 20 6d 65 74 68 6f 64 | 4e 61 6d 65 20 3d 3d 20 | method|Name == |
|000030d0| 22 61 64 64 50 61 6e 65 | 6c 22 20 7c 7c 0d 20 20 |"addPane|l" ||. |
|000030e0| 20 20 20 20 20 20 20 6d | 65 74 68 6f 64 4e 61 6d | m|ethodNam|
|000030f0| 65 20 3d 3d 20 22 61 64 | 64 53 65 61 72 63 68 45 |e == "ad|dSearchE|
|00003100| 6e 67 69 6e 65 22 29 29 | 20 7b 0d 20 20 20 20 20 |ngine"))| {. |
|00003110| 20 20 20 72 65 74 75 72 | 6e 20 22 41 6c 6c 41 63 | retur|n "AllAc|
|00003120| 63 65 73 73 22 3b 0d 20 | 20 20 20 7d 20 65 6c 73 |cess";. | } els|
|00003130| 65 20 7b 0d 20 20 20 20 | 20 20 20 20 72 65 74 75 |e {. | retu|
|00003140| 72 6e 20 22 4e 6f 41 63 | 63 65 73 73 22 3b 0d 20 |rn "NoAc|cess";. |
|00003150| 20 20 20 7d 0d 7d 0d 0d | 2f 2f 20 6d 65 74 68 6f | }.}..|// metho|
|00003160| 64 20 6f 66 20 6e 73 49 | 53 65 63 75 72 69 74 79 |d of nsI|Security|
|00003170| 43 68 65 63 6b 65 64 43 | 6f 6d 70 6f 6e 65 6e 74 |CheckedC|omponent|
|00003180| 0d 6e 73 53 69 64 65 62 | 61 72 2e 70 72 6f 74 6f |.nsSideb|ar.proto|
|00003190| 74 79 70 65 2e 63 61 6e | 47 65 74 50 72 6f 70 65 |type.can|GetPrope|
|000031a0| 72 74 79 20 3d 0d 66 75 | 6e 63 74 69 6f 6e 20 28 |rty =.fu|nction (|
|000031b0| 69 69 64 2c 20 70 72 6f | 70 65 72 74 79 4e 61 6d |iid, pro|pertyNam|
|000031c0| 65 29 20 7b 0d 20 20 20 | 20 72 65 74 75 72 6e 20 |e) {. | return |
|000031d0| 22 4e 6f 41 63 63 65 73 | 73 22 3b 0d 7d 0d 0d 2f |"NoAcces|s";.}../|
|000031e0| 2f 20 6d 65 74 68 6f 64 | 20 6f 66 20 6e 73 49 53 |/ method| of nsIS|
|000031f0| 65 63 75 72 69 74 79 43 | 68 65 63 6b 65 64 43 6f |ecurityC|heckedCo|
|00003200| 6d 70 6f 6e 65 6e 74 0d | 6e 73 53 69 64 65 62 61 |mponent.|nsSideba|
|00003210| 72 2e 70 72 6f 74 6f 74 | 79 70 65 2e 63 61 6e 53 |r.protot|ype.canS|
|00003220| 65 74 50 72 6f 70 65 72 | 74 79 20 3d 0d 66 75 6e |etProper|ty =.fun|
|00003230| 63 74 69 6f 6e 20 28 69 | 69 64 2c 20 70 72 6f 70 |ction (i|id, prop|
|00003240| 65 72 74 79 4e 61 6d 65 | 29 20 7b 0d 20 20 20 20 |ertyName|) {. |
|00003250| 72 65 74 75 72 6e 20 22 | 4e 6f 41 63 63 65 73 73 |return "|NoAccess|
|00003260| 22 3b 0d 7d 0d 0d 6e 73 | 53 69 64 65 62 61 72 2e |";.}..ns|Sidebar.|
|00003270| 70 72 6f 74 6f 74 79 70 | 65 2e 51 75 65 72 79 49 |prototyp|e.QueryI|
|00003280| 6e 74 65 72 66 61 63 65 | 20 3d 0d 66 75 6e 63 74 |nterface| =.funct|
|00003290| 69 6f 6e 20 28 69 69 64 | 29 20 7b 0d 20 20 20 20 |ion (iid|) {. |
|000032a0| 69 66 20 28 21 69 69 64 | 2e 65 71 75 61 6c 73 28 |if (!iid|.equals(|
|000032b0| 6e 73 49 53 69 64 65 62 | 61 72 29 20 26 26 20 0d |nsISideb|ar) && .|
|000032c0| 20 20 20 20 20 20 20 20 | 21 69 69 64 2e 65 71 75 | |!iid.equ|
|000032d0| 61 6c 73 28 6e 73 49 53 | 65 63 75 72 69 74 79 43 |als(nsIS|ecurityC|
|000032e0| 68 65 63 6b 65 64 43 6f | 6d 70 6f 6e 65 6e 74 29 |heckedCo|mponent)|
|000032f0| 20 26 26 0d 20 20 20 20 | 20 20 20 20 21 69 69 64 | &&. | !iid|
|00003300| 2e 65 71 75 61 6c 73 28 | 6e 73 49 53 75 70 70 6f |.equals(|nsISuppo|
|00003310| 72 74 73 29 29 0d 20 20 | 20 20 20 20 20 20 74 68 |rts)). | th|
|00003320| 72 6f 77 20 43 6f 6d 70 | 6f 6e 65 6e 74 73 2e 72 |row Comp|onents.r|
|00003330| 65 73 75 6c 74 73 2e 4e | 53 5f 45 52 52 4f 52 5f |esults.N|S_ERROR_|
|00003340| 4e 4f 5f 49 4e 54 45 52 | 46 41 43 45 3b 0d 20 20 |NO_INTER|FACE;. |
|00003350| 20 20 72 65 74 75 72 6e | 20 74 68 69 73 3b 0d 7d | return| this;.}|
|00003360| 0d 0d 76 61 72 20 73 69 | 64 65 62 61 72 4d 6f 64 |..var si|debarMod|
|00003370| 75 6c 65 20 3d 20 6e 65 | 77 20 4f 62 6a 65 63 74 |ule = ne|w Object|
|00003380| 28 29 3b 0d 0d 73 69 64 | 65 62 61 72 4d 6f 64 75 |();..sid|ebarModu|
|00003390| 6c 65 2e 72 65 67 69 73 | 74 65 72 53 65 6c 66 20 |le.regis|terSelf |
|000033a0| 3d 0d 66 75 6e 63 74 69 | 6f 6e 20 28 63 6f 6d 70 |=.functi|on (comp|
|000033b0| 4d 67 72 2c 20 66 69 6c | 65 53 70 65 63 2c 20 6c |Mgr, fil|eSpec, l|
|000033c0| 6f 63 61 74 69 6f 6e 2c | 20 74 79 70 65 29 0d 7b |ocation,| type).{|
|000033d0| 0d 20 20 20 20 64 65 62 | 75 67 28 22 72 65 67 69 |. deb|ug("regi|
|000033e0| 73 74 65 72 69 6e 67 20 | 28 61 6c 6c 20 72 69 67 |stering |(all rig|
|000033f0| 68 74 20 2d 2d 20 61 20 | 4a 61 76 61 53 63 72 69 |ht -- a |JavaScri|
|00003400| 70 74 20 6d 6f 64 75 6c | 65 21 29 22 29 3b 0d 20 |pt modul|e!)");. |
|00003410| 20 20 20 63 6f 6d 70 4d | 67 72 2e 72 65 67 69 73 | compM|gr.regis|
|00003420| 74 65 72 43 6f 6d 70 6f | 6e 65 6e 74 57 69 74 68 |terCompo|nentWith|
|00003430| 54 79 70 65 28 53 49 44 | 45 42 41 52 5f 43 49 44 |Type(SID|EBAR_CID|
|00003440| 2c 20 22 53 69 64 65 62 | 61 72 20 4a 53 20 43 6f |, "Sideb|ar JS Co|
|00003450| 6d 70 6f 6e 65 6e 74 22 | 2c 0d 20 20 20 20 20 20 |mponent"|,. |
|00003460| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003470| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003480| 53 49 44 45 42 41 52 5f | 43 4f 4e 54 52 41 43 54 |SIDEBAR_|CONTRACT|
|00003490| 49 44 2c 20 66 69 6c 65 | 53 70 65 63 2c 20 6c 6f |ID, file|Spec, lo|
|000034a0| 63 61 74 69 6f 6e 2c 0d | 20 20 20 20 20 20 20 20 |cation,.| |
|000034b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000034c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 74 72 | | tr|
|000034d0| 75 65 2c 20 74 72 75 65 | 2c 20 74 79 70 65 29 3b |ue, true|, type);|
|000034e0| 0d 7d 0d 0d 73 69 64 65 | 62 61 72 4d 6f 64 75 6c |.}..side|barModul|
|000034f0| 65 2e 67 65 74 43 6c 61 | 73 73 4f 62 6a 65 63 74 |e.getCla|ssObject|
|00003500| 20 3d 0d 66 75 6e 63 74 | 69 6f 6e 20 28 63 6f 6d | =.funct|ion (com|
|00003510| 70 4d 67 72 2c 20 63 69 | 64 2c 20 69 69 64 29 20 |pMgr, ci|d, iid) |
|00003520| 7b 0d 20 20 20 20 69 66 | 20 28 21 63 69 64 2e 65 |{. if| (!cid.e|
|00003530| 71 75 61 6c 73 28 53 49 | 44 45 42 41 52 5f 43 49 |quals(SI|DEBAR_CI|
|00003540| 44 29 29 0d 20 20 20 20 | 20 20 20 20 74 68 72 6f |D)). | thro|
|00003550| 77 20 43 6f 6d 70 6f 6e | 65 6e 74 73 2e 72 65 73 |w Compon|ents.res|
|00003560| 75 6c 74 73 2e 4e 53 5f | 45 52 52 4f 52 5f 4e 4f |ults.NS_|ERROR_NO|
|00003570| 5f 49 4e 54 45 52 46 41 | 43 45 3b 0d 20 20 20 20 |_INTERFA|CE;. |
|00003580| 0d 20 20 20 20 69 66 20 | 28 21 69 69 64 2e 65 71 |. if |(!iid.eq|
|00003590| 75 61 6c 73 28 43 6f 6d | 70 6f 6e 65 6e 74 73 2e |uals(Com|ponents.|
|000035a0| 69 6e 74 65 72 66 61 63 | 65 73 2e 6e 73 49 46 61 |interfac|es.nsIFa|
|000035b0| 63 74 6f 72 79 29 29 0d | 20 20 20 20 20 20 20 20 |ctory)).| |
|000035c0| 74 68 72 6f 77 20 43 6f | 6d 70 6f 6e 65 6e 74 73 |throw Co|mponents|
|000035d0| 2e 72 65 73 75 6c 74 73 | 2e 4e 53 5f 45 52 52 4f |.results|.NS_ERRO|
|000035e0| 52 5f 4e 4f 54 5f 49 4d | 50 4c 45 4d 45 4e 54 45 |R_NOT_IM|PLEMENTE|
|000035f0| 44 3b 0d 20 20 20 20 0d | 20 20 20 20 72 65 74 75 |D;. .| retu|
|00003600| 72 6e 20 73 69 64 65 62 | 61 72 46 61 63 74 6f 72 |rn sideb|arFactor|
|00003610| 79 3b 0d 7d 0d 0d 73 69 | 64 65 62 61 72 4d 6f 64 |y;.}..si|debarMod|
|00003620| 75 6c 65 2e 63 61 6e 55 | 6e 6c 6f 61 64 20 3d 0d |ule.canU|nload =.|
|00003630| 66 75 6e 63 74 69 6f 6e | 28 63 6f 6d 70 4d 67 72 |function|(compMgr|
|00003640| 29 0d 7b 0d 20 20 20 20 | 64 65 62 75 67 28 22 55 |).{. |debug("U|
|00003650| 6e 6c 6f 61 64 69 6e 67 | 20 63 6f 6d 70 6f 6e 65 |nloading| compone|
|00003660| 6e 74 2e 22 29 3b 0d 20 | 20 20 20 72 65 74 75 72 |nt.");. | retur|
|00003670| 6e 20 74 72 75 65 3b 0d | 7d 0d 20 20 20 20 0d 2f |n true;.|}. ./|
|00003680| 2a 20 66 61 63 74 6f 72 | 79 20 6f 62 6a 65 63 74 |* factor|y object|
|00003690| 20 2a 2f 0d 73 69 64 65 | 62 61 72 46 61 63 74 6f | */.side|barFacto|
|000036a0| 72 79 20 3d 20 6e 65 77 | 20 4f 62 6a 65 63 74 28 |ry = new| Object(|
|000036b0| 29 3b 0d 0d 73 69 64 65 | 62 61 72 46 61 63 74 6f |);..side|barFacto|
|000036c0| 72 79 2e 63 72 65 61 74 | 65 49 6e 73 74 61 6e 63 |ry.creat|eInstanc|
|000036d0| 65 20 3d 0d 66 75 6e 63 | 74 69 6f 6e 20 28 6f 75 |e =.func|tion (ou|
|000036e0| 74 65 72 2c 20 69 69 64 | 29 20 7b 0d 20 20 20 20 |ter, iid|) {. |
|000036f0| 64 65 62 75 67 28 22 43 | 49 3a 20 22 20 2b 20 69 |debug("C|I: " + i|
|00003700| 69 64 29 3b 0d 20 20 20 | 20 69 66 20 28 6f 75 74 |id);. | if (out|
|00003710| 65 72 20 21 3d 20 6e 75 | 6c 6c 29 0d 20 20 20 20 |er != nu|ll). |
|00003720| 20 20 20 20 74 68 72 6f | 77 20 43 6f 6d 70 6f 6e | thro|w Compon|
|00003730| 65 6e 74 73 2e 72 65 73 | 75 6c 74 73 2e 4e 53 5f |ents.res|ults.NS_|
|00003740| 45 52 52 4f 52 5f 4e 4f | 5f 41 47 47 52 45 47 41 |ERROR_NO|_AGGREGA|
|00003750| 54 49 4f 4e 3b 0d 0d 20 | 20 20 20 72 65 74 75 72 |TION;.. | retur|
|00003760| 6e 20 28 6e 65 77 20 6e | 73 53 69 64 65 62 61 72 |n (new n|sSidebar|
|00003770| 28 29 29 2e 51 75 65 72 | 79 49 6e 74 65 72 66 61 |()).Quer|yInterfa|
|00003780| 63 65 28 69 69 64 29 3b | 0d 7d 0d 0d 2f 2a 20 65 |ce(iid);|.}../* e|
|00003790| 6e 74 72 79 70 6f 69 6e | 74 20 2a 2f 0d 66 75 6e |ntrypoin|t */.fun|
|000037a0| 63 74 69 6f 6e 20 4e 53 | 47 65 74 4d 6f 64 75 6c |ction NS|GetModul|
|000037b0| 65 28 63 6f 6d 70 4d 67 | 72 2c 20 66 69 6c 65 53 |e(compMg|r, fileS|
|000037c0| 70 65 63 29 20 7b 0d 20 | 20 20 20 72 65 74 75 72 |pec) {. | retur|
|000037d0| 6e 20 73 69 64 65 62 61 | 72 4d 6f 64 75 6c 65 3b |n sideba|rModule;|
|000037e0| 0d 7d 0d 0d 2f 2a 20 73 | 74 61 74 69 63 20 66 75 |.}../* s|tatic fu|
|000037f0| 6e 63 74 69 6f 6e 73 20 | 2a 2f 0d 69 66 20 28 44 |nctions |*/.if (D|
|00003800| 45 42 55 47 29 0d 20 20 | 20 20 64 65 62 75 67 20 |EBUG). | debug |
|00003810| 3d 20 66 75 6e 63 74 69 | 6f 6e 20 28 73 29 20 7b |= functi|on (s) {|
|00003820| 20 64 75 6d 70 28 22 2d | 2a 2d 20 73 69 64 65 62 | dump("-|*- sideb|
|00003830| 61 72 20 63 6f 6d 70 6f | 6e 65 6e 74 3a 20 22 20 |ar compo|nent: " |
|00003840| 2b 20 73 20 2b 20 22 5c | 6e 22 29 3b 20 7d 0d 65 |+ s + "\|n"); }.e|
|00003850| 6c 73 65 0d 20 20 20 20 | 64 65 62 75 67 20 3d 20 |lse. |debug = |
|00003860| 66 75 6e 63 74 69 6f 6e | 20 28 73 29 20 7b 7d 0d |function| (s) {}.|
|00003870| 0d 66 75 6e 63 74 69 6f | 6e 20 67 65 74 53 69 64 |.functio|n getSid|
|00003880| 65 62 61 72 44 61 74 61 | 73 6f 75 72 63 65 55 52 |ebarData|sourceUR|
|00003890| 49 28 70 61 6e 65 6c 73 | 5f 66 69 6c 65 5f 69 64 |I(panels|_file_id|
|000038a0| 29 0d 7b 0d 20 20 20 20 | 74 72 79 20 0d 20 20 20 |).{. |try . |
|000038b0| 20 7b 0d 20 20 20 20 20 | 20 20 20 2f 2a 20 75 73 | {. | /* us|
|000038c0| 65 20 74 68 65 20 66 69 | 6c 65 4c 6f 63 61 74 6f |e the fi|leLocato|
|000038d0| 72 20 74 6f 20 6c 6f 6f | 6b 20 69 6e 20 74 68 65 |r to loo|k in the|
|000038e0| 20 70 72 6f 66 69 6c 65 | 20 64 69 72 65 63 74 6f | profile| directo|
|000038f0| 72 79 20 0d 20 20 20 20 | 20 20 20 20 20 2a 20 74 |ry . | * t|
|00003900| 6f 20 66 69 6e 64 20 27 | 70 61 6e 65 6c 73 2e 72 |o find '|panels.r|
|00003910| 64 66 27 2c 20 77 68 69 | 63 68 20 69 73 20 74 68 |df', whi|ch is th|
|00003920| 65 0d 20 20 20 20 20 20 | 20 20 20 2a 20 64 61 74 |e. | * dat|
|00003930| 61 62 61 73 65 20 6f 66 | 20 74 68 65 20 75 73 65 |abase of| the use|
|00003940| 72 27 73 20 63 75 72 72 | 65 6e 74 6c 79 20 73 65 |r's curr|ently se|
|00003950| 6c 65 63 74 65 64 20 70 | 61 6e 65 6c 73 2e 20 2a |lected p|anels. *|
|00003960| 2f 0d 20 20 20 20 20 20 | 20 20 76 61 72 20 64 69 |/. | var di|
|00003970| 72 65 63 74 6f 72 79 5f | 73 65 72 76 69 63 65 20 |rectory_|service |
|00003980| 3d 20 43 6f 6d 70 6f 6e | 65 6e 74 73 2e 63 6c 61 |= Compon|ents.cla|
|00003990| 73 73 65 73 5b 44 49 52 | 5f 53 45 52 56 5f 43 4f |sses[DIR|_SERV_CO|
|000039a0| 4e 54 52 41 43 54 49 44 | 5d 2e 67 65 74 53 65 72 |NTRACTID|].getSer|
|000039b0| 76 69 63 65 28 29 3b 0d | 20 20 20 20 20 20 20 20 |vice();.| |
|000039c0| 69 66 20 28 64 69 72 65 | 63 74 6f 72 79 5f 73 65 |if (dire|ctory_se|
|000039d0| 72 76 69 63 65 29 0d 20 | 20 20 20 20 20 20 20 20 |rvice). | |
|000039e0| 20 20 20 64 69 72 65 63 | 74 6f 72 79 5f 73 65 72 | direc|tory_ser|
|000039f0| 76 69 63 65 20 3d 20 64 | 69 72 65 63 74 6f 72 79 |vice = d|irectory|
|00003a00| 5f 73 65 72 76 69 63 65 | 2e 51 75 65 72 79 49 6e |_service|.QueryIn|
|00003a10| 74 65 72 66 61 63 65 28 | 43 6f 6d 70 6f 6e 65 6e |terface(|Componen|
|00003a20| 74 73 2e 69 6e 74 65 72 | 66 61 63 65 73 2e 6e 73 |ts.inter|faces.ns|
|00003a30| 49 50 72 6f 70 65 72 74 | 69 65 73 29 3b 0d 0d 20 |IPropert|ies);.. |
|00003a40| 20 20 20 20 20 20 20 2f | 2a 20 69 66 20 3c 70 72 | /|* if <pr|
|00003a50| 6f 66 69 6c 65 3e 2f 70 | 61 6e 65 6c 73 2e 72 64 |ofile>/p|anels.rd|
|00003a60| 66 20 64 6f 65 73 6e 27 | 74 20 65 78 69 73 74 2c |f doesn'|t exist,|
|00003a70| 20 67 65 74 20 77 69 6c | 6c 20 63 6f 70 79 0d 20 | get wil|l copy. |
|00003a80| 20 20 20 20 20 20 20 20 | 2a 62 69 6e 2f 64 65 66 | |*bin/def|
|00003a90| 61 75 6c 74 73 2f 70 72 | 6f 66 69 6c 65 2f 70 61 |aults/pr|ofile/pa|
|00003aa0| 6e 65 6c 73 2e 72 64 66 | 20 74 6f 20 3c 70 72 6f |nels.rdf| to <pro|
|00003ab0| 66 69 6c 65 3e 2f 70 61 | 6e 65 6c 73 2e 72 64 66 |file>/pa|nels.rdf|
|00003ac0| 20 2a 2f 0d 20 20 20 20 | 20 20 20 20 76 61 72 20 | */. | var |
|00003ad0| 73 69 64 65 62 61 72 5f | 66 69 6c 65 20 3d 20 64 |sidebar_|file = d|
|00003ae0| 69 72 65 63 74 6f 72 79 | 5f 73 65 72 76 69 63 65 |irectory|_service|
|00003af0| 2e 67 65 74 28 70 61 6e | 65 6c 73 5f 66 69 6c 65 |.get(pan|els_file|
|00003b00| 5f 69 64 2c 20 43 6f 6d | 70 6f 6e 65 6e 74 73 2e |_id, Com|ponents.|
|00003b10| 69 6e 74 65 72 66 61 63 | 65 73 2e 6e 73 49 46 69 |interfac|es.nsIFi|
|00003b20| 6c 65 29 3b 0d 0d 20 20 | 20 20 20 20 20 20 69 66 |le);.. | if|
|00003b30| 20 28 21 73 69 64 65 62 | 61 72 5f 66 69 6c 65 2e | (!sideb|ar_file.|
|00003b40| 65 78 69 73 74 73 28 29 | 29 0d 20 20 20 20 20 20 |exists()|). |
|00003b50| 20 20 7b 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|00003b60| 2f 2a 20 74 68 69 73 20 | 73 68 6f 75 6c 64 20 6e |/* this |should n|
|00003b70| 6f 74 20 68 61 70 70 65 | 6e 2c 20 61 73 20 47 65 |ot happe|n, as Ge|
|00003b80| 74 46 69 6c 65 4c 6f 63 | 61 74 69 6f 6e 28 29 20 |tFileLoc|ation() |
|00003b90| 73 68 6f 75 6c 64 20 63 | 6f 70 79 0d 20 20 20 20 |should c|opy. |
|00003ba0| 20 20 20 20 20 20 20 20 | 20 2a 20 64 65 66 61 75 | | * defau|
|00003bb0| 6c 74 73 2f 70 61 6e 65 | 6c 73 2e 72 64 66 20 74 |lts/pane|ls.rdf t|
|00003bc0| 6f 20 74 68 65 20 75 73 | 65 72 73 20 70 72 6f 66 |o the us|ers prof|
|00003bd0| 69 6c 65 20 64 69 72 65 | 63 74 6f 72 79 20 2a 2f |ile dire|ctory */|
|00003be0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 64 65 62 |. | deb|
|00003bf0| 75 67 28 22 73 69 64 65 | 62 61 72 20 66 69 6c 65 |ug("side|bar file|
|00003c00| 20 64 6f 65 73 20 6e 6f | 74 20 65 78 69 73 74 22 | does no|t exist"|
|00003c10| 29 3b 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 72 |);. | r|
|00003c20| 65 74 75 72 6e 20 6e 75 | 6c 6c 3b 0d 20 20 20 20 |eturn nu|ll;. |
|00003c30| 20 20 20 20 7d 0d 0d 20 | 20 20 20 20 20 20 20 76 | }.. | v|
|00003c40| 61 72 20 66 69 6c 65 5f | 75 72 6c 20 3d 20 43 6f |ar file_|url = Co|
|00003c50| 6d 70 6f 6e 65 6e 74 73 | 2e 63 6c 61 73 73 65 73 |mponents|.classes|
|00003c60| 5b 53 54 44 5f 55 52 4c | 5f 43 4f 4e 54 52 41 43 |[STD_URL|_CONTRAC|
|00003c70| 54 49 44 5d 2e 63 72 65 | 61 74 65 49 6e 73 74 61 |TID].cre|ateInsta|
|00003c80| 6e 63 65 28 43 6f 6d 70 | 6f 6e 65 6e 74 73 2e 69 |nce(Comp|onents.i|
|00003c90| 6e 74 65 72 66 61 63 65 | 73 2e 6e 73 49 46 69 6c |nterface|s.nsIFil|
|00003ca0| 65 55 52 4c 29 3b 0d 20 | 20 20 20 20 20 20 20 66 |eURL);. | f|
|00003cb0| 69 6c 65 5f 75 72 6c 2e | 66 69 6c 65 20 3d 20 73 |ile_url.|file = s|
|00003cc0| 69 64 65 62 61 72 5f 66 | 69 6c 65 3b 0d 0d 20 20 |idebar_f|ile;.. |
|00003cd0| 20 20 20 20 20 20 64 65 | 62 75 67 28 22 73 69 64 | de|bug("sid|
|00003ce0| 65 62 61 72 20 75 72 69 | 20 69 73 20 22 20 2b 20 |ebar uri| is " + |
|00003cf0| 66 69 6c 65 5f 75 72 6c | 2e 73 70 65 63 29 3b 0d |file_url|.spec);.|
|00003d00| 20 20 20 20 20 20 20 20 | 72 65 74 75 72 6e 20 66 | |return f|
|00003d10| 69 6c 65 5f 75 72 6c 2e | 73 70 65 63 3b 0d 20 20 |ile_url.|spec;. |
|00003d20| 20 20 7d 0d 20 20 20 20 | 63 61 74 63 68 20 28 65 | }. |catch (e|
|00003d30| 78 29 0d 20 20 20 20 7b | 0d 20 20 20 20 20 20 20 |x). {|. |
|00003d40| 20 2f 2a 20 74 68 69 73 | 20 73 68 6f 75 6c 64 20 | /* this| should |
|00003d50| 6e 6f 74 20 68 61 70 70 | 65 6e 20 2a 2f 0d 20 20 |not happ|en */. |
|00003d60| 20 20 20 20 20 20 64 65 | 62 75 67 28 22 63 61 75 | de|bug("cau|
|00003d70| 67 68 74 20 22 20 2b 20 | 65 78 20 2b 20 22 20 67 |ght " + |ex + " g|
|00003d80| 65 74 74 69 6e 67 20 73 | 69 64 65 62 61 72 20 64 |etting s|idebar d|
|00003d90| 61 74 61 73 6f 75 72 63 | 65 20 75 72 69 22 29 3b |atasourc|e uri");|
|00003da0| 0d 20 20 20 20 20 20 20 | 20 72 65 74 75 72 6e 20 |. | return |
|00003db0| 6e 75 6c 6c 3b 0d 20 20 | 20 20 7d 0d 7d 0d 0d 66 |null;. | }.}..f|
|00003dc0| 75 6e 63 74 69 6f 6e 20 | 67 65 74 53 74 72 69 6e |unction |getStrin|
|00003dd0| 67 42 75 6e 64 6c 65 28 | 61 55 52 4c 29 20 0d 7b |gBundle(|aURL) .{|
|00003de0| 0d 20 20 76 61 72 20 73 | 74 72 69 6e 67 42 75 6e |. var s|tringBun|
|00003df0| 64 6c 65 53 65 72 76 69 | 63 65 20 3d 20 43 6f 6d |dleServi|ce = Com|
|00003e00| 70 6f 6e 65 6e 74 73 2e | 63 6c 61 73 73 65 73 5b |ponents.|classes[|
|00003e10| 22 40 6d 6f 7a 69 6c 6c | 61 2e 6f 72 67 2f 69 6e |"@mozill|a.org/in|
|00003e20| 74 6c 2f 73 74 72 69 6e | 67 62 75 6e 64 6c 65 3b |tl/strin|gbundle;|
|00003e30| 31 22 5d 2e 67 65 74 53 | 65 72 76 69 63 65 28 29 |1"].getS|ervice()|
|00003e40| 3b 0d 20 20 73 74 72 69 | 6e 67 42 75 6e 64 6c 65 |;. stri|ngBundle|
|00003e50| 53 65 72 76 69 63 65 20 | 3d 20 73 74 72 69 6e 67 |Service |= string|
|00003e60| 42 75 6e 64 6c 65 53 65 | 72 76 69 63 65 2e 51 75 |BundleSe|rvice.Qu|
|00003e70| 65 72 79 49 6e 74 65 72 | 66 61 63 65 28 43 6f 6d |eryInter|face(Com|
|00003e80| 70 6f 6e 65 6e 74 73 2e | 69 6e 74 65 72 66 61 63 |ponents.|interfac|
|00003e90| 65 73 2e 6e 73 49 53 74 | 72 69 6e 67 42 75 6e 64 |es.nsISt|ringBund|
|00003ea0| 6c 65 53 65 72 76 69 63 | 65 29 3b 0d 20 20 76 61 |leServic|e);. va|
|00003eb0| 72 20 61 70 70 4c 6f 63 | 61 6c 65 3b 0d 20 20 76 |r appLoc|ale;. v|
|00003ec0| 61 72 20 6c 6f 63 61 6c | 65 53 65 72 76 69 63 65 |ar local|eService|
|00003ed0| 20 3d 20 43 6f 6d 70 6f | 6e 65 6e 74 73 2e 63 6c | = Compo|nents.cl|
|00003ee0| 61 73 73 65 73 5b 22 40 | 6d 6f 7a 69 6c 6c 61 2e |asses["@|mozilla.|
|00003ef0| 6f 72 67 2f 69 6e 74 6c | 2f 6e 73 6c 6f 63 61 6c |org/intl|/nslocal|
|00003f00| 65 73 65 72 76 69 63 65 | 3b 31 22 5d 2e 67 65 74 |eservice|;1"].get|
|00003f10| 53 65 72 76 69 63 65 28 | 29 3b 0d 20 20 69 66 20 |Service(|);. if |
|00003f20| 28 6c 6f 63 61 6c 65 53 | 65 72 76 69 63 65 29 0d |(localeS|ervice).|
|00003f30| 20 20 20 20 6c 6f 63 61 | 6c 65 53 65 72 76 69 63 | loca|leServic|
|00003f40| 65 20 3d 20 6c 6f 63 61 | 6c 65 53 65 72 76 69 63 |e = loca|leServic|
|00003f50| 65 2e 51 75 65 72 79 49 | 6e 74 65 72 66 61 63 65 |e.QueryI|nterface|
|00003f60| 28 43 6f 6d 70 6f 6e 65 | 6e 74 73 2e 69 6e 74 65 |(Compone|nts.inte|
|00003f70| 72 66 61 63 65 73 2e 6e | 73 49 4c 6f 63 61 6c 65 |rfaces.n|sILocale|
|00003f80| 53 65 72 76 69 63 65 29 | 3b 0d 20 20 69 66 20 28 |Service)|;. if (|
|00003f90| 6c 6f 63 61 6c 65 53 65 | 72 76 69 63 65 29 0d 20 |localeSe|rvice). |
|00003fa0| 20 20 20 61 70 70 4c 6f | 63 61 6c 65 20 3d 20 6c | appLo|cale = l|
|00003fb0| 6f 63 61 6c 65 53 65 72 | 76 69 63 65 2e 47 65 74 |ocaleSer|vice.Get|
|00003fc0| 41 70 70 6c 69 63 61 74 | 69 6f 6e 4c 6f 63 61 6c |Applicat|ionLocal|
|00003fd0| 65 28 29 3b 0d 20 20 76 | 61 72 20 73 74 72 69 6e |e();. v|ar strin|
|00003fe0| 67 42 75 6e 64 6c 65 20 | 3d 20 73 74 72 69 6e 67 |gBundle |= string|
|00003ff0| 42 75 6e 64 6c 65 53 65 | 72 76 69 63 65 2e 43 72 |BundleSe|rvice.Cr|
|00004000| 65 61 74 65 42 75 6e 64 | 6c 65 28 61 55 52 4c 2c |eateBund|le(aURL,|
|00004010| 20 61 70 70 4c 6f 63 61 | 6c 65 29 3b 0d 20 20 69 | appLoca|le);. i|
|00004020| 66 20 28 73 74 72 69 6e | 67 42 75 6e 64 6c 65 29 |f (strin|gBundle)|
|00004030| 0d 20 20 20 20 72 65 74 | 75 72 6e 20 73 74 72 69 |. ret|urn stri|
|00004040| 6e 67 42 75 6e 64 6c 65 | 2e 51 75 65 72 79 49 6e |ngBundle|.QueryIn|
|00004050| 74 65 72 66 61 63 65 28 | 43 6f 6d 70 6f 6e 65 6e |terface(|Componen|
|00004060| 74 73 2e 69 6e 74 65 72 | 66 61 63 65 73 2e 6e 73 |ts.inter|faces.ns|
|00004070| 49 53 74 72 69 6e 67 42 | 75 6e 64 6c 65 29 3b 0d |IStringB|undle);.|
|00004080| 7d 0d 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |}.......|........|
|00004090| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004100| 00 00 01 00 00 00 01 5b | 00 00 00 5b 00 00 00 41 |.......[|...[...A|
|00004110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004200| 00 00 00 57 95 72 c2 ad | 3f e5 32 30 00 04 00 00 |...W.r..|?.20....|
|00004210| 00 00 00 00 00 00 b6 e4 | e2 30 b6 e4 e2 30 00 00 |........|.0...0..|
|00004220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 16 70 |........|.......p|
|00004230| 69 6e 6b 65 72 74 6f 6e | 25 6e 65 74 73 63 61 70 |inkerton|%netscap|
|00004240| 65 2e 63 6f 6d 00 00 00 | 0c 6e 73 53 69 64 65 62 |e.com...|.nsSideb|
|00004250| 61 72 2e 6a 73 00 00 00 | 00 00 00 00 00 01 00 00 |ar.js...|........|
|00004260| 00 01 5b 00 00 00 5b 00 | 00 00 41 53 4f 52 54 02 |..[...[.|..ASORT.|
|00004270| 7e 00 80 00 1c 00 32 00 | 00 63 6b 69 64 00 00 00 |~.....2.|.ckid...|
|00004280| 0a 00 80 00 00 00 00 00 | 00 0c 1e 65 bc 0e 50 72 |........|...e..Pr|
|00004290| 6f 6a 65 63 74 6f 72 20 | 44 61 74 61 00 00 00 00 |ojector |Data....|
|000042a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+